forked from seanshoffman/python-build-cli-planner-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
46 lines (34 loc) · 896 Bytes
/
app.py
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
42
43
44
45
46
from src.database import add_reminder, list_reminders
def handle_input():
choice = input("Choice: ")
if choice == "3":
return False
if choice == "1":
list_reminders()
elif choice == "2":
print()
reminder = input("What would you like to be reminded about?: ")
add_reminder(reminder)
list_reminders()
else:
print("Invalid menu option")
return True
def print_menu():
print()
print("|--------------|")
print("| Pluralsight |")
print("| Reminders |")
print("| App |")
print("|--------------|")
print("* * * * * * * * *")
print("Please select an option:")
print()
print("1) List reminders")
print("2) Add a reminder")
print("3) Exit")
def main():
print_menu()
while handle_input():
print_menu()
if __name__ == "__main__":
main()