+ 1
What's the problem with my code for the Hovercraft challenge?
sale_for_one = 3,000,000 sales = int(input()) profit = sales * sale_for_one loss = 21,000,000 if profit > loss: print('Profit') elif profit == loss: print('Broke Even') elif loss > profit: print('Loss')
4 Respostas
+ 5
ori cohem
Don't put commas in integer value as you wrote on paper. Otherwise it will become 3 values, instead of single value.
+ 4
For the convenience of writing large numbers, you can use only the lower underscore:
sale_for_one = 3_000_000
+ 3
Thanks!