0
Moduel 1 quiz q5
4 Respuestas
+ 3
what's the question?
+ 2
What is your doubt
+ 2
OK the question is:
Fill in the blanks to declare a variable, add 5 to it and print its value.
>>> x = 4
>>> x _= 5
>>> print___
They did the first part for you: the variable x is declared with a value of 4.
Now you have to add 5 to the variable. Because there is a blank before the = sign, it looks like they want you to use the in place operator +=. Remember x += 5 is a short way of writing x = x + 5.
So the first blank is +.
Then you have to print the result, so the command is print(x), i.e. the second blank is (x). Don't forget the () (required in Python 3).
Aside: the last two lines could have been combined by simply using print(x + 5).
0
Can u please help me