In [1]:
# Counting Patients in a Hospital
hospital_patients = {
"patient_1": {"name": "John Doe", "age": 30, "condition": "Flu"},
"patient_2": {"name": "Jane Smith", "age": 25, "condition": "Asthma"},
"patient_3": {"name": "Emily Davis", "age": 45, "condition": "Diabetes"}
}
number_of_patients = len(hospital_patients)
print(f"Number of patients: {number_of_patients}")
Number of patients: 3
In [2]:
# Counting Different Types of Medical Equipment
medical_equipment = {
"ECG": 5,
"X-ray": 3,
"MRI": 2,
"Ultrasound": 4
}
number_of_equipment_types = len(medical_equipment)
print(f"Number of different types of medical equipment: {number_of_equipment_types}")
Number of different types of medical equipment: 4
In [3]:
# Counting Doctors by Specialization
doctors_by_specialization = {
"Cardiology": ["Dr. A", "Dr. B"],
"Neurology": ["Dr. C", "Dr. D", "Dr. E"],
"Pediatrics": ["Dr. F", "Dr. G"]
}
number_of_specializations = len(doctors_by_specialization)
print(f"Number of specializations: {number_of_specializations}")
Number of specializations: 3