Tuesday, January 25, 2011

Example

Today working on the examples that are on this website . I am in lesson #3 and in this lesson I learn that if I put :

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