+ 1
peso = int(input())
dollar = int(input())
peso_d = peso*50
if peso_d > dollar:
print("Dollars")
else :
print("Pesos")
Try this code once
if you want to divide you must divide peso by 50 not 20.
+ 1
It isn't quite clear to me why you use floor division and then convert it to float again but you need to remove the additional space in the Dollars output.
+ 1
Yeah she is correct, this should work.
amt = int(input())
dollar = int(input())
peso = amt/ 20 or dollar = amt*50
if peso >= dollar:
print("Dollars")
else :
print("Pesos")
But instead of dividing dollar with 20, you can also multiple amt with 50 and then compare. It should work all same.
+ 1
You haven't used amt. I think it should be peso = amt/20?
+ 1
Oh, I missed that part: it's 2 cents, some maybe it gets clearer if you put it peso = amt * 0.02