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
5 Antworten
+ 1
Claudio Di Maio , without showing your code in Playground and which challenge exactly it is really hard to guess.
+ 1
Claudio Di Maio , the way you read x is as string. To change it use x = int(input()).
0
input(x)?
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!")
0
It worked, ty