num = 2
num += 1
print num
num = 2
num += 1
print num
num = 2
print num
num += 1
num = 2
num -= 1
print num
num = 2
num -= 1
print num
num = 2
num -= 1
print num
num = 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
num += 1
print num
for num in range(1, 11):
print num
for num in range(1, 101):
print num,
num = 1
while num <= 10:
print num,
num += 1
num = 1
while num <= 10:
print num,
total = 1;
print "Enter a number: ",
num = int(raw_input())
print "The factorial of ", num, " is ",
for counter in range(1, num+1):
total *= counter
print total
secret = 3
print "Guess a number between 1 and 10"
print "You have 3 tries"
for counter in range(1,4):
print "Enter the number now: ",
num = int(raw_input())
if (num == secret):
print "You guessed the secret number!"
break
print "Program over"
secret = 3
print "Guess a number between 1 and 10\n"
print "You have 3 tries\n"
keepgoing = True
for counter in range(1, 4):
if keepgoing == True:
print "Enter the number now: ",
num = int(raw_input())
if (num == secret):
print "You guessed the secret number!"
keepgoing = False
else:
break
print "Program over"
num = 1
while True:
if (num > 10):
break
else:
print num, " ",
num += 1
total = 0
print "How many items do you want to buy: ",
num = int(raw_input())
for counter in range(1, num+1):
if (counter % 13 == 0):
continue
total += 3
print "Total for ", num, " items is $", total
total = 0
print "How many items do you want to buy: ",
num = int(raw_input())
keepgoing = True
for counter in range(1, num+1):
if (not(counter % 13 == 0 )):
total += 3
print "Total for ", num, " items is $", total
for x in range(1, 6):
for y in range(1, 11):
print "X",
print "\n"
print "Enter number of salespersons: ",
persons = int(raw_input())
print "Enter number of sales per salesperson: ",
numSales = int(raw_input())
for x in range(1, persons+1):
total = 0
for y in range(1, numSales+1):
print "Enter sale ", y, " for salesperson ", x, ": "
sale = int(raw_input())
total += sale
average = float(total/numSales)
print "Average sales for salesperson #", x, " is ", average