Welcome to the Get Help category!
Hello together I am a novice to programming and in the data analyst course the following exercise: Python Syntax: Medical Insurance Project - I get the following syntax error.
File “script.py”, line 13
age += 4
^
SyntaxError: invalid syntax
Can anybody be of any assistance? Thank you - See below the code:
1 # create the initial variables below
2 age = 28
3 sex = 0
4 bmi = 26.2
5 num_of_children = 3
6 smoker = 0
8 # Add insurance estimate formula below
9 insurance_cost = 250 * age - 128 * sex + 370 * bmi + 425 * num_of_children + 24000 * smoker - 12500
10 print(“This person’s insurance cost is” + (str(insurance_cost) + “dollars.”)
12 # Age Factor
13 age += 4