@hblee我认为这套课程的主要目的就是为了让你入门Python,Python里的函数多了去,没必要每个都细讲,有需要用到的时候再去查阅Python手册
#print r'\(~_~)/ \n \(~_~)/'
print r'''"To be, or not to be":that is the question.
Whether it's nobler in the mind to suffer.'''
print r'''"To be, or not to be":that is the question.
Whether it's nobler in the mind to suffer.'''
2018-04-25
s = 'Python was started in 1989 by \"Guido\".\nPython is free and easy to learn.'
print s
print s
2018-04-25
x1 = 1
d = 3
n = 100
x100 = x1+d*(n-1)
s = (x1+x100)*100/2
print s
d = 3
n = 100
x100 = x1+d*(n-1)
s = (x1+x100)*100/2
print s
2018-04-25
print(45678+0x12fd2)
print("Learn python in imooc")
print(100<99)
print(0xff==255)
print("Learn python in imooc")
print(100<99)
print(0xff==255)
2018-04-25
皮这一下很开心
j = 0
def more(a,x,n):
if n == 1:
return a
print "(%d+(%d)*%dx)+more(%d,%d,%d)"%(a,(n-1),x,a,x,(n-1))
return (a+(n-1)*x)+more(a,x,n-1)
print more(1,3,100)
j = 0
def more(a,x,n):
if n == 1:
return a
print "(%d+(%d)*%dx)+more(%d,%d,%d)"%(a,(n-1),x,a,x,(n-1))
return (a+(n-1)*x)+more(a,x,n-1)
print more(1,3,100)
2018-04-25
for x in range(1,10):
for y in range(0,10):
if x < y:
print x*10+y
for y in range(0,10):
if x < y:
print x*10+y
2018-04-25
x1 = 1
d = 3
n = 100
x100 = x1+(n-1)*d
s = (x1+x100)*n/2
m =1
j =1
sum = 1
while j<100:
m = m + d
j = j + 1
sum = sum +m
print m,sum
print s
d = 3
n = 100
x100 = x1+(n-1)*d
s = (x1+x100)*n/2
m =1
j =1
sum = 1
while j<100:
m = m + d
j = j + 1
sum = sum +m
print m,sum
print s
2018-04-25
sum = 0
x = 0
while True:
x = x + 1
if x > 100:
break
if not x%2:
continue
sum = sum + x
print sum
x = 0
while True:
x = x + 1
if x > 100:
break
if not x%2:
continue
sum = sum + x
print sum
2018-04-25
s = set([('Adam', 95), ('Lisa', 85), ('Bart', 59)])
for x in s:
print x[0],":",x[1]
for x in s:
print x[0],":",x[1]
2018-04-25
print r'''"To be, or not to be": that is the question.Whether it's nobler in the mind to suffer.'''
2018-04-25