+ 1
Can anyone please tell me what is wrong with below code
x = input() print(x) x += 3 print(x)
5 ответов
+ 14
input() always takes a string so you need to typecast it to int for x+=3 to work. Check out my code below.
https://code.sololearn.com/ci4X0V5KR757/?ref=app
+ 9
In other words just change your first line to
x = int(input())
+ 4
thanks
0
input takes string as input
0
Thanks