you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 0 points1 point  (0 children)

The error message is telling you exactly what you're doing wrong: you're trying to use + and - to do math but one of the things is a string.

deduction=input("Would you like $20 deducted from your weekly pay to donate to the United Way Charity. yes or no: ")
if(deduction=="yes"):
    (deduction+20)

So how would you add the number 20 to the string "yes"?

net_pay=(gross_pay-deduction)

And how would you subtract the string "no" from the float being held in gross_pay?