What's wrong with my code(Argentina)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What's wrong with my code(Argentina)?

pesos=int(input()) dollars=int(input()) exchange=int(pesos/50) if exchange>>dollars: print("Dollars") else: print("Pesos") I tried to solve some problems with if-statements, but there are mistakes. I wrote the same codes in courses, and they work. But now my codes don't want to work.I can't understand why .

24th Jun 2021, 12:51 PM
Татьяна Бузлова
Татьяна Бузлова - avatar
3 Answers
+ 3
Line 4 no need of >> in python . use >
24th Jun 2021, 1:03 PM
Yash Wable 🇮🇳
Yash Wable 🇮🇳 - avatar
+ 3
In if condition you have written extra > greater than operator remove it. otherwise code is fine pesos=int(input()) dollars=int(input()) exchange=int(pesos/50) if exchange>dollars: print("Dollars") else: print("Pesos")
24th Jun 2021, 1:03 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Thank you !!! It works!!!
24th Jun 2021, 1:07 PM
Татьяна Бузлова
Татьяна Бузлова - avatar