0

How to change the input to 'x'

I've almost solved a challenge and all I have to do now is to change the input to a variable x, but if I do 'x = input()' it does't work

29th Dec 2019, 6:10 PM
Claudio Di Maio
Claudio Di Maio - avatar
5 Antworten
+ 1
Claudio Di Maio , without showing your code in Playground and which challenge exactly it is really hard to guess.
29th Dec 2019, 6:13 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
Claudio Di Maio , the way you read x is as string. To change it use x = int(input()).
1st Jan 2020, 2:54 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
input(x)?
29th Dec 2019, 10:19 PM
‎צחק‎اسحاق
‎צחק‎اسحاق - avatar
0
TheWh¡teCat 🇧🇬 Challenge: Gotham City Code: x = input() if x < 5: print("I got this!") elif x >= 5 and x < 10: print("Help me Batman") else: print ("Good Luck out there!")
1st Jan 2020, 2:49 PM
Claudio Di Maio
Claudio Di Maio - avatar
0
It worked, ty
1st Jan 2020, 8:10 PM
Claudio Di Maio
Claudio Di Maio - avatar