-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMilestone_Project_2.py
More file actions
41 lines (36 loc) · 1.02 KB
/
Milestone_Project_2.py
File metadata and controls
41 lines (36 loc) · 1.02 KB
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
33
34
35
36
37
38
39
40
41
from utils import database
USER_CHOISE = """
ENter:
- 'a' to add a new book
- 'l' to list all books
- 'r' to mark a book as read
- 'd' to delete a book
- 'q' to quit
Your choise: """
# choise_menu = {
# 'a' : print(),
# 'l' : print(),
# 'r' : print(),
# 'd' : pr int()
# }
def menu():
database.create_book_table()
user_input = input(USER_CHOISE)
while user_input != 'q':
if user_input == 'a':
database.prompt_add_book()
elif user_input == 'l':
database.list_book()
elif user_input == 'r':
database.prompt_read_book()
elif user_input == 'd':
database.prompt_delete_book()
elif user_input =='s':
pass
else:
print("Wrong input buddy choose again!")
user_input = input(USER_CHOISE)
menu()
"""
Another option: every time a book is added, read, changed, or deleted,
change the file contents so that it matches what the application is showing."""