Advertisement
Shahar_Goldenberg

Untitled

Oct 17th, 2021
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. from pprint import pprint
  2. hospitel = {}
  3.  
  4. amountOfHospitel = int(input("Enter amount of hospitel: "))
  5. for x in range(amountOfHospitel):
  6.     hospitelName = input("hospitel name: ")
  7.     amountOfPatients = int(input("Enter amount of patients: "))
  8.     for i in range(amountOfPatients):
  9.         name = input("Enter name: ")
  10.         age = float(input("Enter age: "))
  11.         vaccin = input("vaccin (yes/no): ")
  12.         if vaccin == "no" or vaccin == "No" or vaccin == "n":
  13.             hospitel[hospitelName] = [name, age, vaccin]
  14.  
  15. pprint(hospitel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement