0

I need help fixing this code

I am doing the hovercraft challenge thing and I keep getting an error with this code: sold = (input()) sell_prof = sold * 3000000 minus = (sold * 2000000) + 1000000 total = sell_prof - minus if total > 0: print("Profit") elif total < 0: print("Loss") else: print("Broke Even")

22nd Sep 2020, 10:38 AM
Bobby
Bobby - avatar
2 Antworten
+ 5
You didn't convert input() to int. input() returns string.
22nd Sep 2020, 10:46 AM
你知道規則,我也是
你知道規則,我也是 - avatar
0
i got it to work with another code
22nd Sep 2020, 10:49 AM
Bobby
Bobby - avatar