sum = 0
x =0
while True:
x = x + 1
if x > 100:
break
if x%2==0:
continue
if x>100:
break
sum+=x
print sum
x =0
while True:
x = x + 1
if x > 100:
break
if x%2==0:
continue
if x>100:
break
sum+=x
print sum
2016-02-02
sum = 0
x =0
while True:
x = x + 1
if x > 100:
break
if x%2==0:
continue
sum+=x
print sum
x =0
while True:
x = x + 1
if x > 100:
break
if x%2==0:
continue
sum+=x
print sum
2016-02-02
给你门看看下新方法
L= []
for i in range(100,999):
if i%100 == i/100 or i%10 == i/100:
L.append(i)
print L
L= []
for i in range(100,999):
if i%100 == i/100 or i%10 == i/100:
L.append(i)
print L
2016-02-01
嗯,加U通不过,
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
可以通过。
print '''静夜思
床前明月光,
疑是地上霜。
举头望明月,
低头思故乡。'''
可以通过。
2016-02-01
for x in [1,2,3,4,5,6,7,8,9]:
for y in [0,1,2,3,4,5,6,7,8,9]:
if x>=y:
continue
print x*10+y
for y in [0,1,2,3,4,5,6,7,8,9]:
if x>=y:
continue
print x*10+y
2016-02-01
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sums = 0.0
for i in d:
sums = sums + d[i]
print i,':',d[i]
print 'average', ':', sums/4
sums = 0.0
for i in d:
sums = sums + d[i]
print i,':',d[i]
print 'average', ':', sums/4
2016-02-01
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sums = 0.0
for i in d:
sums = sums + d[i]
print sums/4
sums = 0.0
for i in d:
sums = sums + d[i]
print sums/4
2016-02-01
N = 100000000
x = 0
while x < N:
print x
x = x + 1
哈哈,还在print......
x = 0
while x < N:
print x
x = x + 1
哈哈,还在print......
2016-02-01