easy question | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 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 Réponses
+ 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