-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstudy tracker.py
More file actions
37 lines (26 loc) · 952 Bytes
/
study tracker.py
File metadata and controls
37 lines (26 loc) · 952 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
35
36
37
#Study Tracker Project
print("Welcome To Study Tracker !!")
study_data = {}
while True:
print("1.enter your study session")
print("2.View Report")
print("3.EXIT")
choice=input("enter your choice between 1 to 3:")
if choice == "1":
subject = input("enter the subject:")
hours = int(input("study hours:"))
if subject in study_data:
print("You already studied this subject,updating hours")
study_data[subject]=study_data[subject] + hours
else:
study_data[subject] = hours
print("your study session recorded")
elif choice == "2":
print("your study report :")
for subject in study_data:
print(subject, ":" , study_data[subject] , "hours" )
elif choice == "3":
print("Thankyou for using study tracker")
break
else:
print("invalid choice")