a = 1 print(a) a = a + 1 print(a) a = a * 2 print(a)
then my result will be something like this:
1 2 4
First I give a value to (a) which is (1) and the first command
in the python shell is (a = 1),
the when I do (a = a + 1) the result will be (2) and if I do
(a = a * 2) and the result will be (4).
No comments:
Post a Comment