+ 1
How do we deal with questions including two lines in the input?
Task: two prices in Pesos and in Dollars, tell which one is smaller. Coversion rate is dollar = pesso*0.02 Example: Input: 400 10 My code is the following. This doesent seem to work def price(peso, dollar): convert = peso* 0.02 if convert <= dollar: return('Pesos') else: return('Dollars')
4 ответов
+ 1
peso = int(input())
dollar = int(input())
And if I am correct you need to print Dollars when peso == dolar.
+ 1
do u mean
peso = input()
dollar = input()
price(peso,dollar)
+ 1
Woww.. You people are great
Thanks, it was simple but I missed.
0
The values of pesos and dollars are integer.
peso = input() -> peso would be a string.