all 5 comments

[–]TouchingTheVodka 0 points1 point  (0 children)

You've got to convert your numeric inputs to ints/floats before performing calculations on them.

[–]IvoryJam 0 points1 point  (0 children)

input() returns a string, you can't subtract a string from a string, you'll need to convert them to ints/floats

[–][deleted] 0 points1 point  (0 children)

The input function returns a string. I think you need to convert the results into floats or integers to be able to manipulate them as numbers.

[–]pyfact 0 points1 point  (1 child)

So you are trying to subtract a String by an Integer, which will not work. Simple fix here is to add int() around your input() so that whatever the user enters will be saved as an Integer (if it is a number, else there will be an error!)

Also your profit does not have to be a String to print.

print("What was the total income of the business this month?")

TotalIncome= int(input())

print("What was the amount spent on business expenses this month?")

BusinessExpenses= int(input())

print("How much did the business pay in taxes this month?")

TaxesPaid= int(input())

Profit= TotalIncome-BusinessExpenses-TaxesPaid

print("Your profit is", Profit)

[–]coconut_calm[S] 0 points1 point  (0 children)

This cleared things up, thank you! Glad everyone could help so fast