-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (25 loc) · 867 Bytes
/
main.py
File metadata and controls
34 lines (25 loc) · 867 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
33
34
from core.manager import TaskManager
from analytics.reports import generate_report
def main():
manager = TaskManager()
while True:
print("\n1. Add Task\n2. View Tasks\n3. Complete Task\n4. Analytics\n5. Exit")
choice = input("Choose: ")
if choice == "1":
title = input("Title: ")
priority = input("Priority (High/Medium/Low): ")
manager.add_task(title, priority)
elif choice == "2":
for i, task in enumerate(manager.list_tasks()):
print(i, task)
elif choice == "3":
index = int(input("Task index: "))
manager.complete_task(index)
elif choice == "4":
generate_report()
elif choice == "5":
break
else:
print("Invalid choice")
if __name__ == "__main__":
main()