+ 1
Help me. Python.
This code works BUT....BUT every time the output is âprofitâ. Even when it has to be âlossâ. I donât know why. https://code.sololearn.com/cC1j8cPY8VmY/?ref=app Thank you very much for your help.
3 Answers
+ 3
compare the number as int. not str
also you need print inside else
+ 3
n = 2100000
num = int(input())
total = num*300000
if total>n:
print("Profit")
elif total<n:
print("Loss")
else:
print("Broke Even")
+ 1