SHARE
TWEET

here you go

Benedictus Dec 14th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import subprocess as sub
  2. import time
  3. number_of_patients = int(input("How many Patients will you like to fill :"))
  4. print ("\n____________Fill out this Informations for {0} patient____________\n".format(number_of_patients))
  5. protein = "     Amount of Proteins (g) required :"
  6. carbohydrate = "     Amount of Carbohydrates (g) required :"
  7. fat = "     Amount of Fats (g) required :"
  8. patient_list = []
  9. food_class = []
  10. for patient in range(1,number_of_patients+1):
  11.     all = "Patient " +str(patient)
  12.     print (all)
  13.     p = int(input(protein))
  14.     c = int(input(carbohydrate))
  15.     f = int(input(fat))
  16.     print("\n")
  17.     patient_list.append(all)
  18.     food_class.append(["proteins = {0}".format(p),"Carbonhydrates = {0}".format(c),"Fats = {0}". format (f)])
  19. time.sleep(1)
  20. print ("[!]processing the form... Please Wait")
  21. time.sleep(2)
  22. sub.call("clear",shell = True)
  23. print("*****The Information provided are :******\n")
  24. for i,v in zip(patient_list,food_class):
  25.     print("          {0}".format(i),"\n",v)
  26.     print ("\n")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top