# -*- coding: utf-8 -*-
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
2019-09-26
print r'''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.'''
Whether it's nobler in the mind to suffer.'''
2019-09-26
sum = 0
x = 0
while True:
x = x + 1
if x > 100:
break
elif x%2==0:
continue
else:
sum=sum+x
print sum
x = 0
while True:
x = x + 1
if x > 100:
break
elif x%2==0:
continue
else:
sum=sum+x
print sum
2019-09-25
这属于数学计算题了,花了好久才整出来
x1 = 1
d = 3
n = 100
x100 = (n-1)*d+1
s = (x100+x1)*(n/2)
print s
x1 = 1
d = 3
n = 100
x100 = (n-1)*d+1
s = (x100+x1)*(n/2)
print s
2019-09-25
s = 'Python was started in 1989 by \" Guido \". \n Python is free and easy to learn. '
print s
print s
2019-09-25
x1 = 1
d = 3
n = 100
x100 = (n-1)*d+1
s = ((n-1)*n*d)/2+n*x1
print s,x100
d = 3
n = 100
x100 = (n-1)*d+1
s = ((n-1)*n*d)/2+n*x1
print s,x100
2019-09-25
sum = 0
x = 1
n = 1
while True:
sum+=x
x+=x
n+=1
if n>20:
break
print sum
x = 1
n = 1
while True:
sum+=x
x+=x
n+=1
if n>20:
break
print sum
2019-09-23
s = 0
n = 1
a=1
while True:
a=a+3
s=a+s
n=n+1
if n >99:
break
s=s+1
print s
n = 1
a=1
while True:
a=a+3
s=a+s
n=n+1
if n >99:
break
s=s+1
print s
2019-09-22
def a(x, y, z):
b = x + (z - 1) * y
sum = z * (x + b) / 2
print(sum)
a(1, 3, 100)
b = x + (z - 1) * y
sum = z * (x + b) / 2
print(sum)
a(1, 3, 100)
2019-09-22
N = 100
x = 0
L=[]
while x < N :
x= x+1
L.append(x)
sum = 0.00
for name in L:
if (name % 2) == 1:
print name
sum+=name
print sum
x = 0
L=[]
while x < N :
x= x+1
L.append(x)
sum = 0.00
for name in L:
if (name % 2) == 1:
print name
sum+=name
print sum
2019-09-22