#1
names = ["Mohamed", "Sara", "Xia", "Paul", "Valentina", "Jide", "Aaron", "Emily", "Nikita", "Paul",]
insurance_costs = [13262.0, 4816.0, 6839.0, 5054.0, 14724.0, 5360.0, 7640.0, 6072.0, 2750.0, 12064.0,]
names.append("Priscilla")
insurance_costs.append(8320.0)
#2
medical_records = list(zip(insurance_costs, names))
#3
print(medical_records)
[(13262.0, 'Mohamed'), (4816.0, 'Sara'), (6839.0, 'Xia'), (5054.0, 'Paul'), (14724.0, 'Valentina'), (5360.0, 'Jide'), (7640.0, 'Aaron'), (6072.0, 'Emily'), (2750.0, 'Nikita'), (12064.0, 'Paul'), (8320.0, 'Priscilla')]
#4
num_medical_records = len(medical_records)
#5
print("There are" + str(num_medical_records) + "medical records. ")
There are11medical records.
#6
first_medical_record = medical_records[0]
#7
print("Here is the firs medical record: " + str(first_medical_record))
Here is the firs medical record: (13262.0, 'Mohamed')
#8
medical_records.sort()
print("Here are the medical records sorted by insurance cost: " + str(medical_records))
Here are the medical records sorted by insurance cost: [(2750.0, 'Nikita'), (4816.0, 'Sara'), (5054.0, 'Paul'), (5360.0, 'Jide'), (6072.0, 'Emily'), (6839.0, 'Xia'), (7640.0, 'Aaron'), (8320.0, 'Priscilla'), (12064.0, 'Paul'), (13262.0, 'Mohamed'), (14724.0, 'Valentina')]
#9
cheapest_three = medical_records[:3]
#10
print("Here are the three cheapest insurance costs in our medical records: " + str(cheapest_three))
Here are the three cheapest insurance costs in our medical records: [(2750.0, 'Nikita'), (4816.0, 'Sara'), (5054.0, 'Paul')]
#11
priciest_three = medical_records[-3:]
#12
print("Here are the three most expensive insurance costs in our medical records: " + str(priciest_three))
Here are the three most expensive insurance costs in our medical records: [(12064.0, 'Paul'), (13262.0, 'Mohamed'), (14724.0, 'Valentina')]
#13
occurrences_paul = names.count("Paul")
print("There are" + str(occurrences_paul) + "individuals with the name Paul in our medical records.")
There are2individuals with the name Paul in our medical records.
#FINAL....