-
-
Save codecademydev/434dcc076bbf22485ccd0ab285ffcbed to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create calculate_insurance_cost() function below: | |
def calculate_insurance_cost (name, age, sex, bmi, num_of_children, smoker): | |
estimated_cost= 250*age - 128*sex + 370*bmi + 425*num_of_children + 24000*smoker - 12500 | |
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) | |
my_insurance_cost = calculate_insurance_cost("Yen", 29, 0, 29.1, 0, 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment