Hello All,
I am working on the PHYTON Medical Insurance Project,
As I can see, the code is runing OK, and I dont inderstand why I am not able to pass to the next exercice, could you help me please!
This is the code I have done.
Create calculate_insurance_cost() function below:
def calculate_insurance_cost(name, age, sex, bmi, num_of_children, smoker):
estimated_cost=250age - 128sex + 370bmi + 425num_of_children + 24000*smoker - 12500
print(“The estimated insurance cost for " + name+ " is " + str(estimated_cost) + " dollars.” )
return estimated_cost
Estimate Maria’s insurance cost
maria_insurance_cost = calculate_insurance_cost( “Maria”,28,0,26.2,3,0)
Estimate Omar’s insurance cost
omar_insurance_cost = calculate_insurance_cost(“Omar”, 35, 1, 22.2, 0, 1)
patula_insurance_cost = calculate_insurance_cost(“Patula”, 40, 1, 22.2, 0, 1)
def diference_two_insurance_cost(one_cost, two_cost):
diference = one_cost - two_cost
print( “The difference in insurance cost is " + str(diference) + " dollars”)
diference_two_insurance_cost(maria_insurance_cost, omar_insurance_cost)
THIS IS THE OUTPUT:
The estimated insurance cost for Maria is 5469.0 dollars.
The estimated insurance cost for Omar is 28336.0 dollars.
The estimated insurance cost for Patula is 29586.0 dollars.
The difference in insurance cost is -22867.0 dollars