0

How to make a menu on python

Please help it's for my programming assignment 😭

9th Mar 2022, 10:21 PM
Megan Lott
Megan Lott - avatar
3 Answers
+ 4
What code do you have? Show us what you/we are working with.
9th Mar 2022, 10:22 PM
Brave Tea
Brave Tea - avatar
0
def Find(): print("Find a player") def Best(): print("Best 5 scores") def Append(): print("Append a player") def Exit(): print("Exit") def menu(): print() print("1...Find a player") print("2...Best 5 scores") print("3...Append a player to the file") print("4...Exit") selection=int(input("Enter your choice: ")) if selection==1: Find() elif selection==2: Best() elif selection==3: Append() elif selection==4: exit else: print("Invalid choice. Enter 1-4") menu()
10th Mar 2022, 12:51 AM
Megan Lott
Megan Lott - avatar
0
That's my code
10th Mar 2022, 12:51 AM
Megan Lott
Megan Lott - avatar