Can you explain me what's wrong with this code ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Can you explain me what's wrong with this code ?

a= input("Enter first number : ") b= input("Enter second number :" ) if a> b: print("First number is greater than second number") if a< b: print("First number is smaller than second number")

15th May 2020, 12:03 PM
Ahmad Naweed
2 Answers
15th May 2020, 12:06 PM
你知道規則,我也是
你知道規則,我也是 - avatar
+ 1
Ahmad Naweed , you read a and b as strings. Convert both of them to int.
15th May 2020, 12:05 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar