-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguestbook.py
More file actions
31 lines (29 loc) · 779 Bytes
/
Copy pathguestbook.py
File metadata and controls
31 lines (29 loc) · 779 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
import users
def display_menu():
print('1: Login')
print('2: Register')
if users.is_logged_in == True:
print('3: Post Comment')
print('9: Exit')
choice = input('Enter the number of where you want to go: ')
check_choice(choice)
def check_choice(choice):
if choice.isdigit():
choice = int(choice)
if choice == 1:
users.login()
display_menu()
elif choice == 2:
users.register()
display_menu()
elif choice == 3:
pass
elif choice == 9:
pass
else:
print('Please choose a correct option')
display_menu()
else:
print('Please choose a correct option')
display_menu()
display_menu()