+ 2
I face test case problem of hovercraft code coach in Sololearn. Please help me. Here is my code:
insurance=1000000 num_of_hovercraft=10 cost_per_hovercraft=2000000 total_cost=insurance+(num_of_hovercraft*cost_per_hovercraft) sp=3000000 s=int(input("Enter number of sales:")) rev= sp*s if rev > total_cost : print (" profit") elif rev < total_cost : print (" loss") else: print (" broke even")
3 Respuestas
+ 6
Be careful with your print statements. If the logic is correct (we need to know what the task is), then you probably don't want to print a space before your words profit, loss and broke even.
+ 6
Check constraints what output u have to print it must be same as which is given in question don't add extra spaces
print("Profit")
print("Broke Even")
print("Loss")
+ 3
Also don't add any prompt message in input(), just use
s = int( input() )
it's already noted : Remove leading space..