Functions - no parameters
def main():
done = False
while not done:
print("Menu")
print("D - Do Now")
print("Q - Quit")
choice = input("Choice: ")
if choice == "D":
print("Do Now")
name = input("What's your name")
print(name,"welcome back!")
elif choice == "Q":
print("Exiting Game!")
done = True
main()Example 1
Example 2
Example 3
Example 4
Last updated
Was this helpful?