ingedients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for i in ingredients:
    print(i)
ingedients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
x = 1
for i in ingredients:
    print('%s %s' % (x, i))
    x = x + 1
ingredients = ['snails','leeches','gorilla belly-button lint','caterpillar eyebrows','centipede toes']
for i in ingredients:
    print('%s %s' % (x, i))
    x = x + 1
for i, x in enumerate(ingredients):
    print('%s %s' % (i+1, x))
weights = []
w = 65
for year in range(1,16):
    w = w + 1
    weights.append(w)
list(range(0,5))
list(range(0,1000))
def testfunc(myname):
    print('hello %s' % myname)
testfunc('Mary')
def testfunc(fname,lname):
    print('Hello %s %s' % (fname,lname))
testfunc('Mary','Smith')
def savings(pocket_money,paper_route,spending):
    return pocket_money + paper_route - spending
print(savings(10,10,5))
def variable_test():
    first_variable = 10
    second_variable = 20
    return first_variable * second_variable
print(variable_test())
another_variable = 100
def variable_test2():
    first_variable = 10
    second_variable = 20
    return first_variable * second_variable * another_variable
print(variable_test2())
def spaceship_building(cans):
    total_cans = 0
    for week in range(1, 53):
        total_cans = total_cans + cans
        print('Week %s = %s cans' % (week, total_cans))
spaceship_building(2)
spaceship_building(6)
import time()
import time
print(time.asctime())
import sys
print(sys.stdin.readline())
def silly_age_joke(age):
    if age >= 10 and age <= 13:
        print('What is 13 + 40 + 28? A headache!')
    else:
        print('Huh')
silly_age_joke(9)
silly_age_joke(11)
def silly_age_joke():
    print('How old are you?')
    age = int(sys.stdin.readline())
    if age >= 10 and age <= 13:
        print('What is 13 + 29 + 28')
    else:
        print('Huh')
silly_age_joke()
def silly_age_joke():
    print('How old are you?')
    age = int(sys.stdin.readline())
    if age >= 10 and age <= 13:
        print('What is 13 + 29 + 28?                                      else:
        print('Huh')
def silly_age_joke():
    print('How old are you?')
    age = int(sys.stdin.readline())
    if age >= 10 and age <= 13:
        print('What is 13 + 29 + 28?                                      else:
        print('Huh')
def silly_age_joke():
    print('How old are you?')
    age = int(sys.stdin.readline())
    if age >= 10 and age <= 13:
        print('What is 13 + 29 + 28?                                      else:
        print('Huh')
def silly_age_joke():
    print('How are you old?')
    age = int(sys.stdin.readline())
    if age >= 10 and age <= 13:
        print('What is 13 + 28? A headache')
    else:
        print('Huh')
silly_age_joke()
dir()
type(x)
dir(x)
x
x.upper()
dir(x)
type(x)
abs(-2)
max(2, 5)
max(2, 5, 7)
x = []
x
x = list()
x
def add(a, b):
    return a+b
add(2, 5)
a
a = 1
def add(a, b):
    print "a is %s" % a
    return a+b
a
add(2, 3)
import datetime
dir(datetime)
datetime.datetime.today()
datetime.date.today()
dir(datetime.date)
d = datetime.date.today()
d
d.weekday()
d.year
d.month
d.day
d2 = datetime.date(2018, 12, 31)
d2
c = d2 - d
c
dir(c)
type(c)
c.days
moon_weight(30,0.25)
def moon_weight(weight,up):
    x = []
    for year in range(1,16):
        weight = weight + up
        moon_weight = weight * 0.165
        x.append(moon_weight)
    return x
def moon_weight(weight,up):
    x = []
    for year in range(1,16):
        weight = weight + up
        mweight = weight * 0.165
        x.append(mweight)
    return x
dir()
moon_weight(30,0.25)
print moon_weight(30,0.25)
for x in moon_weight(30, 0.25):
    print x
history 80
def moon_weight(weight,up):
    x = []
    for year in range(1,16):
        weight = weight + up
        mweight = weight * 0.165
        x.append(mweight)
    return x
def moon_weight(weight,up):
    x = []
    for year in range(1,16):
        weight = weight + up
        mweight = weight * 0.165
        print '增加一个月球重量：%s' % mweight
        x.append(mweight)
    return x
moon_weight(30, 0.25)
def moon_weight(weight,up):
    x = []
    for year in range(1,16):
        weight = weight + up
        mweight = weight * 0.165
        print '增加一个月球重量：%s' % mweight
        x.append(mweight)
        print x
    return x
moon_weight(30, 0.25)
def moon_weight(weight,up):
    x = []
    for year in range(1,16):
        weight = weight + up
        mweight = weight * 0.165
        print '增加一个月球重量：%s' % mweight
        x.append(mweight)
        print x
moon_weight(30,0.25)
y = moon_weight(30,0.25)
y = moon_weight(30,0.25)
y = moon_weight(30,0.25)
y = moon_weight(30,0.25)
y = moon_weight(30,0.25)
y
print y
def moon_weight(weight, up, years):
    for year in range(1, years)
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        mweight = weight * 0.165
        x.append(mwight)
        return x
moon_weight(90, 0.25, 5)
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_wight)
        return x
moon_weight(90, 0.25, 5)
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        moon_weight = weight * 0.165
        x.append(moon_wight)
        return x
moon_weight(90, 0.25, 5)
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_weight)
        return x
moon_weight(90, 0.25, 5)
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years + 1):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_weight)
        return x
moon_weight(90, 0.25, 5)
def moon_weight(weight, up, years):
    years = years + 1
    x = []
    for year in range(1, years):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_weight)
        return x
moon_weight(90, 0.25, 5)
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_weight)
     return x
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_weight)
    return x
moon_weight(90, 0.25, 5)
import sys
def moon_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print('y')
    up = float(sys.stdin.readline())
    print('z')
    years = float(sys.stdin.readline())
    years = years + 1
moon_weight()
def moon_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print('y')
    up = float(sys.stdin.readline())
    print('z')
    years = float(sys.stdin.readline())
    years = years + 1
moon_weight()
def moon_weight(weight, up, years):
    x = []
    for year in range(1, years):
        weight = weight + up
        m_weight = weight * 0.165
        x.append(m_weight)
    return x
def converted_moon(earth_weight):
    return earth_weight*0.165
def moon_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print converted_moon(weight)
moon_weight()
def m_weight(weight):
    return weight * 0.165
def up(u):
    return up
def years(r):
    return years
def m_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print('up' and 'years')
m_weight()
def m_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print up(1)
    print years(5)
m_weight()
def m_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print up('1')
    print years('5')
m_weight()
m_weight()
def up(a):
    return a + 1
def years(b):
    return b + 1
def m_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print up(weight) 
    print years(weight)
m_weight()
def m_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print up(up) 
    print years(years)
m_weight()
m_weight()
def m_weight():
    print('x')
    weight = float(sys.stdin.readline())
    print up(weight) 
    print years(weight)
m_weight()
1 == True
0 == True
0 != True
bool(1)
bool(0)
bool(None)
bool(' ')
bool([])
None == []
dir([])
bool()
x = []
x.append(1)
x
x.append(2)
x
x.insert(3)
dir(x.insert)
dir(x.insert.__doc__)
x.insert(3, 1)
x
x.insert(0, 3)
x
len(x)
x.count()
x.count(1)
x.count(0)
x.reverse()
x
x.reverse()
x
x.sort()
x
eval('10 * 5')
'10*5'
int(float('123.456'))
range(0,10)
range(1,11)
sum(range(1,11))
sum(range(1,101))
history -f ./study/demo4.py
