-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
150 lines (123 loc) · 4.48 KB
/
main.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
def getdate():
import datetime
return datetime.datetime.now()
def Harry():
print("Which Section :-")
print("(1) Exercises")
print("(2) Diet")
time_1 = getdate()
user_harry = int(input("Enter (Serial number) : "))
if(user_harry == 1):
with open("1_harry_exercise.txt","a") as f:
harry_input_0 = input("["+str(time_1)+"] : "+"")
f.write("["+str(time_1)+"] : " + harry_input_0 + "\n")
print("Successfully documented !!")
elif(user_harry == 2):
with open("1_harry_diet.txt","a") as f:
harry_input_1 = input("["+str(time_1)+"] : "+"")
f.write("["+str(time_1)+"] : " + harry_input_1 + "\n")
print("Successfully documented !!")
def Rohan():
print("Which Section :-")
print("(1) Exercises")
print("(2) Diet")
time_1 = getdate()
user_Rohan = int(input("Enter (Serial number) : "))
if(user_Rohan == 1):
with open("1_Rohan_exercise.txt","a") as f:
Rohan_input_0 = input("["+str(time_1)+"] : "+"")
f.write("["+str(time_1)+"] : " + Rohan_input_0 + "\n")
print("Successfully documented !!")
elif(user_Rohan == 2):
with open("1_Rohan_diet.txt","a") as f:
Rohan_input_1 = input("["+str(time_1)+"] : "+"")
f.write("["+str(time_1)+"] : " + Rohan_input_1 + "\n")
print("Successfully documented !!")
def Hammad():
print("Which Section :-")
print("(1) Exercises")
print("(2) Diet")
time_1 = getdate()
user_Hammad = int(input("Enter (Serial number) : "))
if(user_Hammad == 1):
with open("1_Hammad_exercise.txt","a") as f:
Hammad_input_0 = input("["+str(time_1)+"] : "+"")
f.write("["+str(time_1)+"] : " + Hammad_input_0 + "\n")
print("Successfully documented !!")
elif(user_Hammad == 2):
with open("1_Hammad_diet.txt","a") as f:
Hammad_input_1 = input("["+str(time_1)+"] : "+"")
f.write("["+str(time_1)+"] : " + Hammad_input_1 + "\n")
print("Successfully documented !!")
def Harry_hist():
print("Which Section do you want to look into :-")
print("(1) Exercises")
print("(2) Diet")
user_harry_log = int(input("Enter (Serial Number): "))
if(user_harry_log == 1):
with open("1_harry_exercise.txt","rt") as f:
print(f.read())
elif(user_harry_log == 2):
with open("1_harry_diet.txt","rt") as f:
print(f.read())
def Rohan_hist():
print("Which Section do you want to look into :-")
print("(1) Exercises")
print("(2) Diet")
user_Rohan_log = int(input("Enter (Serial Number): "))
if(user_Rohan_log == 1):
with open("2_Rohan_exercise.txt","rt") as f:
print(f.read())
elif(user_Rohan_log == 2):
with open("2_Rohan_diet.txt","rt") as f:
print(f.read())
def Hammad_hist():
print("Which Section do you want to look into :-")
print("(1) Exercises")
print("(2) Diet")
user_Hammad_log = int(input("Enter (Serial Number): "))
if(user_Hammad_log == 1):
with open("3_Hammad_exercise.txt","rt") as f:
print(f.read())
elif(user_Hammad_log == 2):
with open("3_Hammad_diet.txt","rt") as f:
print(f.read())
c = getdate()
print("["+str(c)+"]")
print("\t\t\t\tHealth Management System")
print("What are you going to do ?")
print("(1) Documenting")
print("(2) Seeing history")
user_option = int(input("Enter (Serial Number) : "))
if(user_option == 1):
try:
print("3 People :-")
print("(1) Harry")
print("(2) Rohan")
print("(3) Hammad")
user = int(input("Enter (Serial Number) : "))
if(user == 1):
Harry()
elif(user ==2):
Rohan()
elif(user == 3):
Hammad()
else:
print("Wrong Input !!!")
except Exception as e:
print("Invalid Input")
elif(user_option == 2):
print("Patient's Logs :-")
print("(1) Harry")
print("(2) Rohan")
print("(3) Hammad")
try:
user_input_hist = int(input("Of whom do you want to see the history of : "))
if(user_input_hist == 1):
Harry_hist()
elif(user_input_hist == 2):
Rohan_hist()
elif(user_input_hist == 3):
Hammad_hist()
except Exception as e:
print("Invalid Input")