0

Moduel 1 quiz q5

14th May 2017, 12:50 PM
Behramkhan
Behramkhan - avatar
4 ответов
+ 3
what's the question?
14th May 2017, 1:09 PM
Mario L.
Mario L. - avatar
+ 2
What is your doubt
14th May 2017, 1:09 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 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).
16th May 2017, 9:39 PM
David Ashton
David Ashton - avatar
0
Can u please help me
14th May 2017, 12:51 PM
Behramkhan
Behramkhan - avatar