Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created October 26, 2020 08:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save codecademydev/434dcc076bbf22485ccd0ab285ffcbed to your computer and use it in GitHub Desktop.
Save codecademydev/434dcc076bbf22485ccd0ab285ffcbed to your computer and use it in GitHub Desktop.
Codecademy export
# 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