Health Management system with pytyon
"""
program instructions.....
frist of all ask the user he want to lock or retrive...
if he want to lock ask him about the username....
after the user name ask him would he want to enter about the food or exercise
if he want retrive ask him the username....
then ask him what about he want to ask food or health
then show him what he ask for ....
"""
print("Wellcome to Our health system".title())
userwish = str(input("If you want to lock something about you press E or If you want to retrive something press R: "))
username = str(input("Enter you name: "))
userwish2 = str(input("""For food Type food:
For Health Type health.\n"""))
def functiondate():
import datetime
return datetime.datetime.now()
if userwish == str("E"):
userhealth = str(input("Enter what do you want to lock: "))
with open(username+"_"+userwish2+".py".strip(),"a") as f:
f.write("Data entry time: "+str(functiondate())+"\n"+"Data: "+userhealth+"\n")
print("Successfully Data Entered")
elif userwish == str("R"):
with open(username+"_"+userwish2+".py".strip(),"r+") as g:
with open(username+"_"+userwish2+".py".strip(),"r+") as g:
print(g.readline(),g.readline(),end="")
print("Data shown successfully")
Comments
Post a Comment