- 1

easy question

declare a var ,add 5 to it and print its value x=4 x+=5 print(x) someone who has corrected the question please tell me the right answer

2nd Aug 2017, 4:46 PM
fangyuan
2 ответов
+ 3
From where is the question? If the code you've provided is rejected, so try to do: var = 4 var += 5 print(var) ... as in Python 'var' is not a reserved keyword, maybe the right expected answer need use a variable named 'var'?
3rd Aug 2017, 7:40 AM
visph
visph - avatar
+ 2
I don't understand. Are you asking what 4 + 5 is? Or are you unsure what the += is. If so, x += 5 is the same as writing: x = x + (5) Which is just 4 + 5.
2nd Aug 2017, 7:14 PM
Rrestoring faith
Rrestoring faith - avatar