+ 1

Argentina Exercise: Failing test case 5

Hello go Guys, Could you please help me to findthe error in my code? Only the test case 5 Fails. THXX ar=int(input()) us=int(input())*50 k=us/ar if us<ar: print("Dollars") elif us>ar: print("Pesos")

2nd Jan 2020, 8:06 PM
Bhreno Paladino
Bhreno Paladino - avatar
6 Réponses
+ 5
What happens if us == ar?
2nd Jan 2020, 8:08 PM
Russ
Russ - avatar
+ 3
Consider the case when equality holds.
2nd Jan 2020, 11:47 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
You have to convert the Pesos to Dollars, "the exchange rate is 2 cents for every Peso" (1 Peso = 0.02 cents) Then: ar = int(input()) * 0.02 us = int(input())
3rd Jan 2020, 1:41 AM
Kevin E. Torres Caldas
Kevin E. Torres Caldas - avatar
+ 2
28th Feb 2020, 9:44 AM
高于鈞
高于鈞 - avatar
0
p, d = int(input()), int(input()) print("Dollars" if d < .02 * p else "Pesos")
3rd Jan 2020, 5:34 AM
David Ashton
David Ashton - avatar
0
Remove the *50 at the us variable and instead divide the ar variable by 50
4th May 2020, 3:32 PM
Epsilon ︻╦̵̵͇̿̿̿̿╤──
Epsilon ︻╦̵̵͇̿̿̿̿╤── - avatar