# Project Medical Insurance stuck on task 2/13 my insurance_cost formula displays in the output w/o calculating the +-*/ functions

I’m obviously new and confused. I tried to look up the answer but couldn’t find one. I found another person with the exact same problem as me though. I am doing the Medical Insurance project and I am stuck because when I run my save function to run the program so far the output reads like this

This persons insurance cost is 250 * age - 128 * sex + 370 * bmi + 425 * num_of_children + 24000 * smoker - 12500 dollars.
Instead of calculating this ^ insurance cost formula and getting 5469.0 it just puts it into the output
I’ve tried as many things as I could think of but that clearly wasn’t enough so please help. I am really struggling, Ive taken notes and everything through the course so far and still I don’t know what I am doing wrong here. I wasn’t able to find an answer to the other persons topic who had the same problem either, but anyway here is my code.

# create the initial variables below

age = “28”
smoker = “0”
sex = “0”
bmi = “26.2”
num_of_children = “3”

# Add insurance estimate formula below

insurance_cost = “250 * age - 128 * sex + 370 * bmi + 425 * num_of_children + 24000 * smoker - 12500”
print(“This person’s insurance cost is " + str(insurance_cost) + " dollars.”)

my output is
This person’s insurance cost is 250 * age - 128 * sex + 370 * bmi + 425 * num_of_children + 24000 * smoker - 12500 dollars.
but should be
This person’s insurance cost is 5469.0 dollars.

Thanks for any help or feedback.

Do you have your variable numbers in " "
Remove them.

I did the exact same thing!

1 Like

Thats terrible of me. I didn’t have them in " at first and it wasn’t working (probably had a typo somewhere or something) then I put them in " in 1 of many attempts to fix it and just left them like that. Anyway thank you so much. That was starting to get disheartening lol thanks again

2 Likes

I understand, I did it too. Same thing.
I’m sure neither of us will make the same mistake again though

2 Likes

Good catch! Sometimes it takes a second set of .
Also, there’s no need to apologize. We are are learners here.

Numeric data types don’t require quotes. Strings do.
Check this out for further explanation:

https://realpython.com/python-data-types/