Pls python learners I'm stuck with this question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Pls python learners I'm stuck with this question

Fill in the blanks to declare a variable,add 5 to it and print its value. >>> x = 4 >>> x __ = 5 >>> print__

19th Nov 2017, 1:07 PM
Oguadinma Ebube
Oguadinma Ebube - avatar
2 Answers
+ 6
x = x + 5 has a short variant x += 5 print(x) The same with: x = x - 5 or x -= 5 x = x * 5 or x *= 5 x = x / 5 or x /= 5 x = x % 5 or x %= 5
19th Nov 2017, 1:26 PM
Boris Batinkov
Boris Batinkov - avatar
+ 1
From what Boris Batinkov has said, it is >>> x = 4 >>>x +=5 >>> print x
25th Nov 2017, 5:46 PM
Chibueze Orji
Chibueze Orji - avatar