Hi, I am creating a weekly planner, that takes the goals of each day in a week and then views them to the user.
#Code :-
goal=[]
def main_display():
print("Weekly Planner")
print("1, Set Goals")
print("2, View Goals")
print("3, Exit")
def set_goals(goals):
days_in_week=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
for day in days_in_week:
goals = input(f"{day}, ")
goal.append(goals)
print("entered goal successfully")
main_menu()
def view_goals(goals):
days_in_week=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
if not goals:
print("No goals entered yet")
else:
print("Weekly Plan")
#for day in (days_in_week):
print(f"{days_in_week} : {goal}")
main_menu()
def main_menu():
main_display()
choice=input("Enter choice 1/2/3:")
if choice == '1':
set_goals(goal)
print(goal)
elif choice== '2':
view_goals(goal)
elif choice== '3':
print("Exiting the Planner!")
else:
print("Invalid number. Try again")
main_menu()
def main():
goals = {}
main_menu()
if name == "main":
main()
_________________________________________________________________________
The output I desire is:-
Monday: <goal>
Tuesday: <goal>, and soo on
The output I am getting:- ['read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'die', 'read', 'study', 'code', 'study', 'project', 'project', 'rest']
is a list of all inputs.
how to solve it?
#Code :-
goal=[]
def main_display():
print("Weekly Planner")
print("1, Set Goals")
print("2, View Goals")
print("3, Exit")
def set_goals(goals):
days_in_week=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
for day in days_in_week:
goals = input(f"{day}, ")
goal.append(goals)
print("entered goal successfully")
main_menu()
def view_goals(goals):
days_in_week=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
if not goals:
print("No goals entered yet")
else:
print("Weekly Plan")
#for day in (days_in_week):
print(f"{days_in_week} : {goal}")
main_menu()
def main_menu():
main_display()
choice=input("Enter choice 1/2/3:")
if choice == '1':
set_goals(goal)
print(goal)
elif choice== '2':
view_goals(goal)
elif choice== '3':
print("Exiting the Planner!")
else:
print("Invalid number. Try again")
main_menu()
def main():
goals = {}
main_menu()
if name == "main":
main()
_________________________________________________________________________
The output I desire is:-
Monday: <goal>
Tuesday: <goal>, and soo on
The output I am getting:- ['read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'read', 'die', 'read', 'study', 'code', 'study', 'project', 'project', 'rest']
is a list of all inputs.
how to solve it?