0

Iā€™m confused on this question

Fill in the blanks to declare a variable, add 5 to it and print its value >>> x=4 >>> x blank =5 >>> print blank Could u please explain the blanks aswell please, thanks

22nd Apr 2018, 5:17 PM
Janet
Janet - avatar
5 Answers
+ 4
No problem. You're welcome Janet :)
22nd Apr 2018, 5:39 PM
Dev
Dev - avatar
+ 6
The code seems to be using the shorthand operator x += 5 in the first blank, which is same as x = x + 5 Obviously, x is the last blank.
22nd Apr 2018, 5:23 PM
Dev
Dev - avatar
+ 5
Janet I just checked the quiz. The Code Playground uses Python 3.x, so you need to use parenthesis. Do it like print(x)
22nd Apr 2018, 5:35 PM
Dev
Dev - avatar
0
Iā€™ve tried but , itā€™s wrong
22nd Apr 2018, 5:31 PM
Janet
Janet - avatar
0
Ohhhh, Iā€™m new , didnā€™t realise Thank you
22nd Apr 2018, 5:37 PM
Janet
Janet - avatar