In [1]:

```
x=0
print "The value of x is ",x
x+=1
print "The value of x is ",x
```

In [3]:

```
x=0
y=0
print "The value of y is ", y+1
print "The value of x is ", x+1
```

In [5]:

```
x=0
y=1
x=(y)*2
print "The Value of x ",x
x=0
y=1
x=(y+1)*2
print "The Value of x ",x
```

In [6]:

```
x=0
y=0
x=(y)*4
print "The Value of x", x
y=0
x=(y+1)*4
print "The Value of x", x
```

In [7]:

```
x=1
y=1
x=(y)*4
print "The value of x is ",x
y=1
x=(y-1)*4
print "The value of x is ",x
```

In [8]:

```
x=1
y=2
x=y*x+1
print "The value of x is: ",x
x=1
y=2
x+=y*x+1
print "The value of x is: ",x
```

In [9]:

```
x=1
y=2
x=y*x+1
print "The value of x is: ",x
x=1
y=2
x-=y*x+1
print "The value of x is: ",x
```

In [11]:

```
x=0
while (x<10):
print "The value of x is ",x
x=x+1
```

In [13]:

```
iSelection=0
while (iSelection!=4):
print "1\tDeposit Funds"
print "2\tWithdraw Funds"
print "3\tPrint Balance"
print "4\tQuit"
iSelection=int(raw_input("Enter Your Selection(1-4): "))
print "Thank you"
```

In [1]:

```
x=9
while (x<10):
print "This printf statement is executed at least once"
x=x+1
while (x<10):
print "This printf statement is never executed "
x=x+1
```

In [2]:

```
for x in range(10,5,-1):
print "The value of x is ",x
```

In [2]:

```
import random
iNumQuestions=int(raw_input("Enter the number of questions to ask: "))
for x in range(iNumQuestions):
iRndNum1=(random.randint(0,100)%10)+1
iRndNum2=(random.randint(0,100)%10)+1
iResponse=int(raw_input("what is "+ str(iRndNum1)+" * "+str(iRndNum2)+" : "))
if(iResponse==(iRndNum1*iRndNum2)):
print "Correct"
else:
print "The Corrent answer was ", iRndNum1*iRndNum2
```

In [3]:

```
for x in range(10,5,-1):
if x==7:
break
print x
```

In [4]:

```
for x in range(10,5,-1):
if x==7:
continue
print x
```

In [6]:

```
for x in range(25):
print "\n"
```

In [1]:

```
import time
import random
import os
cYesNo=raw_input("Play a game of Concentration?(y or n)")
if(cYesNo=='y' or cYesNo=='Y'):
i1=random.randint(0,100) % 100
i2=random.randint(0,100) % 100
i3=random.randint(0,100) % 100
print "Concentrate on the next three numbers\n",i1,i2,i3
iCurrentTime=int(round(time.time()*1000))
iElapsedTime=int(round(time.time()*1000))
while((iCurrentTime-iElapsedTime)<3):
iElapsedTime=int(round(time.time()*1000))
os.system('cls')
iResp1=int(raw_input("Enter a number:"))
iResp2=int(raw_input("Enter a number:"))
iResp3=int(raw_input("Enter a number:"))
if(i1==iResp1 and i2==iResp2 and i3==iResp3):
print "Congratulations!"
else:
print "Sorry, Correct numbers were ",i1,i2,i3
```