0
Need help with Hovercraft
I’m getting 4/5 correct and can’t figure out why. If possible please help. My code is below, in Python. Thank you. import math sales = int(input()) months = int(math.ceil(sales/10)) cost = 21*months if 3*sales > cost: print("Profit") elif 3*sales < cost: print("Loss") else: print("Broke Even")
3 Antworten
+ 1
Fails for 0. Output should be "Loss", not "Broke Even".
Hint: Take a look at "months" value.