# Health Management System
print("This is a Health Management System")
def getdate():
import datetime
return datetime.datetime.now()
def take(k):
if k == 1:
c = int(input("Type 1 for Food /n Type 2 for Exercise /n"))
if c == 1:
d = int(input("Enter 1 for Divyansh /n Enter 2 for Rohit /n Enter 3 for Sohan"))
if d == 1:
value = input("Type here /n")
with open("Dpsc-food.txt") as op:
op.write(str([str(getdate())]) + ":" + value + "/n")
print("Sucessfully Written")
if d == 2:
value = input("Type here /n")
with open("Rohit-food.txt") as op:
op.write(str([str(getdate())]) + ":" + value + "/n")
print("Sucessfully Written")
if d == 3:
value = input("Type here /n")
with open("Sohan-food.txt") as op:
op.write(str([str(getdate())]) + ":" + value + "/n")
print("Sucessfully Written")
else :print("Enter a correct value...")
if c == 1:
d = int(input("Enter 1 for Divyansh /n Enter 2 for Rohit /n Enter 3 for Sohan"))
if d == 1:
value = input("Type here /n")
with open("Dpsc-ex.txt") as op:
op.write(str([str(getdate())]) + ":" + value + "/n")
print("Sucessfully Written")
if d == 2:
value = input("Type here /n")
with open("Rohit-ex.txt") as op:
op.write(str([str(getdate())]) + ":" + value + "/n")
print("Sucessfully Written")
if d == 3:
value = input("Type here /n")
with open("Sohan-ex.txt") as op:
op.write(str([str(getdate())]) + ":" + value + "/n")
print("Sucessfully Written")
else :print("Enter a correct value...")
Comments
Post a Comment