-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise5.py
More file actions
86 lines (80 loc) · 3.5 KB
/
Copy pathexercise5.py
File metadata and controls
86 lines (80 loc) · 3.5 KB
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
def getdate():
import datetime
return datetime.datetime.now()
def get_client(x):
client= x
if client==1:
action=int(input("Press 1 for exercise or 2 for diet= "))
if action==1:
add= int(input("Press 1 for log or 2 for retrieval= "))
if add==1:
a= input("Enter your exercise= ")
with open("harry-ex.txt", "a") as f:
f.write(str([str(getdate())]) + ":" +a+"\n")
print("successfully added")
elif add==2:
with open("harry-ex.txt") as af:
for i in af:
print(i, end="")
elif action==2:
add= int(input("Press 1 for log or 2 for retrieval= "))
if add==1:
b= input("Enter your diet= ")
with open("harry-dt.txt","a") as f:
f.write(str([str(getdate())]) + ":" +b+"\n")
print("successfully added")
elif add==2:
with open("harry-dt.txt") as af:
for i in af:
print(i, end="")
if client==2:
action=int(input("Press 1 for exercise or 2 for diet= "))
if action==1:
add= int(input("Press 1 for log or 2 for retrieval= "))
if add==1:
a= input("Enter your exercise= ")
with open("rohan-ex.txt","a") as f:
f.write(str([str(getdate())]) + ":" +a+"\n")
print("successfully added")
elif add==2:
with open("rohan-ex.txt") as af:
for i in af:
print(i, end="")
elif action==2:
add= int(input("Press 1 for log or 2 for retrieval= "))
if add==1:
b= input("Enter your diet= ")
with open("rohan-dt.txt","a") as f:
f.write(str([str(getdate())]) + ":" +b+"\n")
print("successfully added")
elif add==2:
with open("rohan-dt.txt") as af:
for i in af:
print(i, end="")
if client==3:
action=int(input("Press 1 for exercise or 2 for diet= "))
if action==1:
add= int(input("Press 1 for log or 2 for retrieval= "))
if add==1:
a= input("Enter your exercise= ")
with open("hammad-ex.txt", "a") as f:
f.write(str([str(getdate())]) + ":" +a+"\n")
print("successfully added")
elif add==2:
with open("hammad-ex.txt") as af:
for i in af:
print(i, end="")
elif action==2:
add= int(input("Press 1 for log or 2 for retrieval= "))
if add==1:
b= input("Enter your diet= ")
with open("hammad-dt.txt", "a") as f:
f.write(str([str(getdate())]) + ":" +b+"\n")
print("successfully added")
elif add==2:
with open("hammad-dt.txt") as af:
for i in af:
print(i, end="")
print("Welcome to the Health Management System")
name= int(input(" choose cleint- press 1 for harry, 2 for Rohan and 3 for hammad= "))
svs= get_client(name)