+ 8
what's wrong with this "Hovercraft" code?
sell = int(input()) if sell <= 0 or sell == 7: print("Broke Even") if sell < 7 and sell > 0: print("Loss") if sell > 7 and sell < 11: print("Profit")
3 Antworten
+ 8
I get it!!! My mistake
sell = int(input())
if sell < 7:
print("Loss")
elif sell > 7:
print("Profit")
else:
print("Broke Even")
+ 3
Read the conditions again...
it need not be less than 11 or greater than 0 to test.
+ 1
I don't see any error in your code.
Your code works fine
I think you might have got some failed test cases