In [1]:

```
for num in range(1, 11):
print num,
```

In [2]:

```
num = 1
while num <=10:
print num,
num += 1
```

In [1]:

```
num = 0
while (num <= 10):
print num,
num += 1
```

In [4]:

```
print "Enter a positive number: ",
num = int(raw_input())
while (num <= 0):
print "Number must be positive; please retry: ",
num = int(raw_input())
print "The number you entered is ", num, " "
```

In [5]:

```
print "Enter a positive number: ",
num = int(raw_input())
while (num <= 0):
print "Number must be positive; try again (Y/N): ",
choice = raw_input()
if (choice == 'Y'):
print "Enter number: ",
num = int(raw_input())
else:
break
print "The number you entered is ", num, " "
```

In [6]:

```
quit = False
print "Enter a positive number: ",
num = int(raw_input())
while (num <= 0 and quit == False):
print "Number must be positive; try again (Y/N): ",
choice = raw_input()
if (choice is 'Y'):
print "Enter number: ",
num = int(raw_input())
else:
quit = True
if (quit == False):
print "The number you entered is ", num, " "
else:
print "You did not enter a positive number"
```

In [7]:

```
quit = False
while(True):
print "Enter a positive number: ",
num = int(raw_input())
if (num > 0):
break
else:
print "Number must be positive; try again (Y/N): ",
choice = raw_input()
if (choice != 'Y'):
quit = True
break
if (quit == False):
print "The number you entered is ", num, " "
else:
print "You did not enter a positive number"
```

In [ ]:

```
counter = 0
total = 0
print "How many items do you want to buy: ",
num = int(raw_input())
while(counter < num):
counter += 1
if (counter % 13 == 0):
continue
total += 3
print "Total for ", num, " items is $", total
```

In [10]:

```
counter = 0
total = 0
print "How many items do you want to buy: ",
num = int(raw_input())
keepgoing = True
while(counter < num):
counter += 1
if (not(counter % 13 == 0)):
total += 3;
print "Total for ", num, " items is $", total
```

In [11]:

```
x = 0
while(x < 5):
x += 1
y = 0
while(y < 5):
y += 1
print "X",
print '\n'
```

In [12]:

```
quit = False
print "Enter a positive number: ",
num = int(raw_input())
while (num <= 0 and quit == False):
print "Number must be positive; try again (Y/N): ",
choice = raw_input()
if (choice is 'Y'):
print "Enter number: ",
num = int(raw_input())
else:
quit = True
if (quit == False):
print "The number you entered is ", num, " "
else:
print "You did not enter a positive number"
```

In [ ]:

```
```