type text, edit


In [2]:
print "hello"


hello

In [3]:
a = 1

In [4]:
print a


1

In [5]:
a + 2


Out[5]:
3

In [6]:
a + 4


Out[6]:
5

In [7]:
a + 7


Out[7]:
8

In [8]:
a + 3 - 2


Out[8]:
2

In [9]:
b=4.3

In [34]:
c="hello"

In [11]:
c="hello"

In [12]:
a,b,c


Out[12]:
(1, 4.3, 'hello')

In [24]:
for i in range (0,10,1):
    print i


0
1
2
3
4
5
6
7
8
9

In [30]:
i=0
while i < 10:
    print i
    i=i+1


0
1
2
3
4
5
6
7
8
9

In [33]:
for i in range (0,10,1):
    if i ==3:
        print "I have 3"
    elif i < 3:
        print "Ihave many"
    else :
        print "I have few"


Ihave many
Ihave many
Ihave many
I have 3
I have few
I have few
I have few
I have few
I have few
I have few

In [35]:
alist =[1,2,3]

In [36]:
alist[1]


Out[36]:
2

In [37]:
atuple = (1,2,3)

In [38]:
atuple[1]


Out[38]:
2

In [ ]:


In [ ]:


In [ ]: