age = 13
if age > 20:
    print('You are too old!')
age = 23
if age > 20:
    print('You are too old!')
print '\t'
print('You are \ttoo old!')
age = 10
if age == 10:
    print('What\'s brown and sticky? \\ A stick!!')
age = 12
if age == 12:
    print("A pig fell in the mud!")
else:
    print("Shh.It's a secret.")
age = 8
if age == 12:
    print("A pig fell in the mud!")
else:
    print("Shh.It's a secret.")
history 12
!12
!!12
if age == 10 or age == 11 or age == 12:
    print('What is 13 + 49 + 84 + 155 + 97? A headache!')
else:
    print('Huh?')
age
age = 12
if age == 10 or age == 11 or age == 12:
    print('What is 13 + 49 + 84 + 155 + 97? A headache!')
else:
    print('Huh?')
age = 8
if age >= 10 and age <= 13:
    print('What is 13 + 49 + 84? A headache!')
else:
    print('Huh?')
age = 11
if age >= 10 and age <= 13:
    print('What is 13 + 49 + 84? A headache!')
else:
    print('Huh?')
age = '10'
converted_age = int(age)
type(age)
type(converted_age)
print(converted_age)
print(age)
age = '10.5'
converted_age = float(age)
print(age)
print(converted_age)
age = '10'
print(age)
age + 10
money = 2000
if money > 1000:
    print("I'm rich!!")
else:
    print("I'm not rich!!")
      print("But I might be later...")
if money > 1000:
    print("I'm rich!!")
else:
    print("I'm not rich!!")
    print("But I might be later...")
twinkies = 90
if twinkies < 100 or twinkies > 500:
    print('Either too little or too much')
money = 70
if (money >= 100 and money <= 500) or (money >= 1000 and money <= 5000):    print('yes')
else:
    print('no')
money = 3000
money = 3000
if (money >= 100 and money <= 500) or (money >= 1000 and money <= 5000):    print('yes')
else:
    print('no')
ninjas = 5
if ninjas < 50:
    print('too much')
if ninjas < 30:
    print('it\'s a little difficult,but I can solve')
if ninjas < 10:
    print('I can fight those ninjas')
for x in range(0,5):
    print('hello')
print(list(range(10,20)))
print(list(range(0,100)))
for x in range (0,5):
    print('hello %s' % x)
range(0, 5)
for x in [0,1,2,3,4]:
    print 'hi,' + str(x)
wizard_list = [1,2,3]
for i in wizard_list:
    print(i)
h = ['huge','hair','pants')
h = ['huge','hair','pants']
h = ('huge','hair','pants')
for i in h:
    print(i)
    print(i)
h = ['hair','huge','pants']
hugehairpants = ['huge','hair,'pants']
for i in hugehairpants:
    print(i)                #
    for j in hugehairpants: # These are the FIRST block.
        print(j)            #
hugehairpants = ['huge','hair','pants']
for i in hugehairpants:
    print(i)                #
    for j in hugehairpants: # These are the FIRST block.
        print(j)            #
hugehairpants = ['huge','hair','pants']
for i in hugehairpants:
    print(i)                
    for j in hugehairpants: 
        print(j)            # This line is also the SECOND block.
found_coins = 20
magic_coins = 70
stolen_coins = 3
coins = found_coins
for week in range(1,53):
    coins = coins + magic_coins -stolen_coins
    print('Week %s = %s' % (week,coins))
for step in range(0,20):
    print(step)
step = 0
while step < 10000:
    print(step)
    if tired == True:
        break
    elif badweather == True:
        break
    else:
        step = step + 1
x = 45
y = 80
while x < 50 and y < 100:
    x = x + 1
    y = y + 1
    print(x,y)
while True:
    print('hu jun hua')
while 1:
    print('hu jun hua')
for x in range(0,20):
    print('hello %s' % x)
    if x < 9:
        break
for x in range(0,20):
    print('hello %s' % x)
    if x < 16:
        break
for x in range(0,20):
    print('hello %s' % x)
    if x == 15:
        break
for x in range(0,20):
    if x == 15:
        break
    print('hello %s' % x)
4 % 2
for x in range(0,20):
    if x % 2 == 0:
        print(x)
    if x == 18:
        break
for x in range(2,20):
    if x % 2 == 0:
        print(x)
    if x == 18:
        break
for x in range(1,20):
    if x % 2 == 1:
        print(x)
    if x == 19:
        break
for x in range(1,20):
    if x % 2 != 0:
        print(x)
    if x == 19:
        break
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for i in ingredients:
    print(i)
    for x in range(1,6):
        print('%s i' % x)
        for j in ingredients:
            print(j)
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for x in range(1,6):
    print('%s ingredients' % x)
ingredients = 'snails leeches gorilla belly-button lint caterpillar eyebrows centipede toes'
for x in range(1,6):
    print('%s ingredients' % x)
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for i in ingredients:
    print(i)
    for x in range(1,6):
        print('%s %s' % (x,i))
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for x in range(1,6):
    print('%s %s' % (x,i))
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for x in range(1,6):
    print('%s %s' % (x,i))
    x = x + 1
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
x = x + 1
for i in ingredients:
for x in range(1,6):
    print('%s %s' % (x,i))
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
x = x + 1
for i in ingredients:
    for x in range(1,6):
        print('%s %s' % (x,i))
w = 65
for year in range(1,16):
    w = w + 1
    moon_w = w * 0.165
    print(moon_w)
ingredients
for i in ingredients:
    print(i)
for x in range(1,6):
    print('%s %s' % (x,i))
for x in range(5):
    print(ingredients[x])
for x in range(5):
    print('%s %s' % (x, ingredients[x]))
x = x + 1
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for x in range(5):
    y = x + 1
    print('%s %s' % (y, ingredients[x]))
for i in ingredients:
    print i
y = 1
for i in ingredients:
    print '%s %s' % (y, i)
    y = y + 1
while i in ingredients:
    x = 1
    i = 0
    while x < 6 and i < 5:
        print(x,i)
x = 1
ingredients[x] = 1
while x < 5 and ingredients[x] < 5
while x < 5 and ingredients[x] < 5:
    x = x + 1
    ingredients[x] = ingredients[x] + 1
    print(x,ingredients[x])
ingredients
x = 1
while x < 6:
    x = x + 1
    print(x,ingredients[x])
x = 0
while x < 5:
    x = x + 1
    print(x,ingredients[x])
x = 0
while x < 6:
    x = x + 1
    print(x,ingredients[x])
x = 0
while x < 6:
    y = x + 1
    print(y,ingredients[x])
x = 0
while x < 6:
    x = x + 1
    y = x + 1
    print(y,ingredients[x])
x = 0
y = 0
while x < 6 and y < 6:
    x = x + 1
    y = y + 1
    print(y,ingredients[x])
for i in ingredients:
    print i
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
i = 0
while i < len(ingredients):
    print(ingredients[i])
    i = i + 1
i = 0
while i < len(ingredients):
    print(ingredients[i])
    i = i + 1
i
i = 0
while i < len(ingredients):
    print(i,ingredients[i])
    i = i + 1
i = 0
while i < len(ingredients):
    print(i+1, ingredients[i])
    i = i + 1
i = 0
while i < len(ingredients):
    print('%s %s' %(i+1, ingredients[i]))
    i = i + 1
for i, x in enumerate(ingredients):
    print '%s %s' % (i+1, x)
enumerate(ingredients)
dir(enumerate(ingredients))
for i, x in enumerate(ingredients):
    print '%s %s' % (i+1, x)
w = 65
for year in range(1,16):
    w = w + 1
    moon_w = w * 0.165
    print(moon_w)
for year in range(1,16):
    w = w + 1
    moon_w = w * 0.165
    print('year %s is %s' % (year,moon_w))
for year in range(1,16):
    w = w + 1
    moon_w = w * 0.165
    print('year %s = %s' % (year,moon_w))
w = 65
for year in range(1,16):
    w = w + 1
    moon_w = w * 0.165
    print('year %s = %s' % (year,moon_w))
w = 65
for year in range(1,16):
    moon_w = (w + 1) * 0.165
    print('year %s = %s' % (year,moon_w))
w = 65
for year in range(1,16):
    w = w + 1
    print(w)
weights = []
w = 65
for y in range(15):
    w = w + 1
    weights.append(w)
print weights
for x in weights:
    print(x * 0.165)
moon_weights = []
for x in weights:
    moon_weights.append(x * 0.165)
print(moon_weights)
history -f ./study/demo3.py
