Apr-24-2017, 04:37 PM
i know there is not a goto or similar command in python,im trying to make a menu with submenus
a main menu that gives you games/math/managment options,and when you choose one of them it brings you to another menu where you can run a task
however i want there to be a option in the submenus that allows you to go back to main menu ,and/or after the task is finished for it to go back to its mother submenu
here is the basic code
how do i do that,im Really new so i need guidance and examples :(
a main menu that gives you games/math/managment options,and when you choose one of them it brings you to another menu where you can run a task
however i want there to be a option in the submenus that allows you to go back to main menu ,and/or after the task is finished for it to go back to its mother submenu
here is the basic code
#!/usr/bin/python
print ("\n" * 200)
print ("Welcome,what would you like to do?type the number")
print ("\n")
print ("[1]:Math solver")
print ("[2]:exit")
print ("\n")
menu = input(": ")
if menu = 1
print ("\n" * 200)
print ("What type is your question?")
print ("\n" * 3)
print ("[1]:Bisquared-equasion")
print ("[2]:Exit")
print ("\n")
menu = input(": ")
if menu = 1if menu = 1 should run a task after which it should go back to the Math solver menu instead of quitinghow do i do that,im Really new so i need guidance and examples :(
