Skip to content

Commit e75605e

Browse files
committed
basic menu
1 parent 5d9d48c commit e75605e

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

python/10-sql/consume-sdk.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
def print_menu():
2+
print("""Choose a number:
3+
1. Print all books
4+
2. Add a book
5+
3. Delete a book
6+
4. Update a book
7+
Q. QUIT""")
8+
9+
print("Hello, Welcome to your reading list.")
10+
while(True):
11+
print_menu()
12+
response = int(input())
13+
if response == 1:
14+
print("Here are all of your books")
15+
elif response == 2:
16+
print("adding a book")
17+
elif response == 3:
18+
print("Deleting a book")
19+
elif response == 4:
20+
print("Updating a book")
21+
else:
22+
print("Good luck reading!")
23+
break
24+
25+

0 commit comments

Comments
 (0)