Python medical insurance project - incorrect output

In this project I do not understand why I cannot get the correct output. I attach my screen shot. Thank you for any input.

(Also, when variables are integers, do they always need quotes around them? In the cheat sheet that is not the case.)

Thank you.

That where your problem lies. When you put quotes around integers or floats, they stop being themselves and become strings. To verify this, you can print variable using type() function and observe the result. Also, when you try to print the value of insurance_cost all you doing is outputting the formula as a string instead of letting it calculate the result.

1 Like