Plus-equals operator, changing variable

Hello!

I have got an issue with medical insurance project: https://www.codecademy.com/paths/data-analyst/tracks/dacp-python-fundamentals/modules/dscp-python-syntax/projects/ds-python-syntax-project

Doing extra practice task I’ve noticed that if you’ve written the same wording of variable “sex” as it is above, the program gives you one exact amount of cost’s change. But after changing the wording of variable to “sex = 0”, the amount of cost change differs.
How it can be explained? Shouldn’t those two types of writing a variable work in the same way?

num_of_children -= 2

sex -= 1

new_insurance_cost = 250 * age - 128 * sex + 370 * bmi + 425 * num_of_children + 24000 * smoker - 12500

change_in_insurace_cost = new_insurance_cost - insurance_cost

print(“The change in estimated cost in case of being female with one kid rather than more is " + str(change_in_insurace_cost) +” dollars.")

num_of_children += 2

sex = 0

new_insurance_cost = 250 * age - 128 * sex + 370 * bmi + 425 * num_of_children + 24000 * smoker - 12500

change_in_insurace_cost = new_insurance_cost - insurance_cost

print(“The change in estimated cost in case of being female and the mother of many children is " + str(change_in_insurace_cost) +” dollars.")

Welcome to the forums.

Do you get an error? It works for me. though, I would just write female as 0 and not -=1, but that’s me.

isn’t the cost 22725.0?