+ 1

Why isn't any output coming out ?

Pls help, here is the code in python- #Basics x = input() if x == int(1111): print("One Thousand One Hundred Eleven") if x == int(9999): print("Nine Thousand Nine Hundred Ninety Nine")

29th Mar 2020, 1:57 PM
Ahsen Mirza
Ahsen Mirza - avatar
3 Respuestas
+ 2
You need to change x to an int, not the numbers. x = int(input()) if x == 1111: ....
29th Mar 2020, 2:08 PM
Russ
Russ - avatar
+ 1
Please convert string x to integer x = int(x) No need to write 1111 and 9999 inside int function Correct: x = input() x = int(x) if x == 1111: print("One Thousand One Hundred Eleven") if x == 9999: print("Nine Thousand Nine Hundred Ninety Nine")
29th Mar 2020, 2:10 PM
Sujan Kharal
Sujan Kharal - avatar
0
you didn't convert input() to int
29th Mar 2020, 2:08 PM
你知道規則,我也是
你知道規則,我也是 - avatar