-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu-program.py
More file actions
32 lines (24 loc) · 862 Bytes
/
Menu-program.py
File metadata and controls
32 lines (24 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
print('Hello! Welcome to my Menu Program!')
name = input('Please enter your name: ')
print(f'Welcome {name.capitalize()}!')
running = True
while running:
print('(1) Hello Message')
print('(2) Math Question')
print('(3) Fun Message')
print('(4) Exit')
choice = input('Please enter your choice: ')
if choice == '1':
print(f'Hello {name.capitalize()}! Hope you\'re enjoying the Menu Program!')
elif choice == '4':
print(f'Goodbye, {name.capitalize()}!')
running = False
elif choice == '2':
print('What is 50 * 2?' )
answer = input('Enter your answer: ')
if answer == '100':
print(f'Correct {name.capitalize()}!')
else:
print(f'Wrong answer!')
elif choice == '3':
print(f"Dont give up! Keep learning python {name.capitalize()}! 🔥")