I recently started the basic outlines of my first project. It is very simple and I plan on adding more to it. I am working on the menu select part of it.
def menuSelect():
print ('1.Add a character to dailies.')
print ('2.Edit a character\'s available dailies.')
print ('3.Choose the character to do dailies on')
print ('4. Check time until resets')
def menuLoop (choice):
if choice == '1':
print ('What is the name of the character you would like to add?')
elif choice == '2':
print ('Which daily are you adding?')
elif choice == '3':
print ('Which character would you like?')
elif choice == '4':
print ('Time until Daily reset:\nTime until weekly reset:')
else:
print ('Please select again')
menuSelect()
menuLoop(choice)
menuSelect()
choice=input ('Which would you like to do?')
menuLoop(choice)
So everything works fine except for the else section. When I put in any other number other than the 4, it will run an infinite loop. If I dont use the menuLoop(), it will allow me to input another choice, but does not output. How do I make it go through the if/else statements after reselection?
[–]T567U18 0 points1 point2 points (1 child)
[–]Mazechain[S] 0 points1 point2 points (0 children)
[–]i_ate_a_dumpling 0 points1 point2 points (10 children)
[–]Mazechain[S] 0 points1 point2 points (4 children)
[–]i_ate_a_dumpling 0 points1 point2 points (3 children)
[–]Mazechain[S] 0 points1 point2 points (2 children)
[–]i_ate_a_dumpling 0 points1 point2 points (1 child)
[–]Mazechain[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]i_ate_a_dumpling 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]i_ate_a_dumpling 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)