sum = 0
x = 0
while True:
x = x + 1
if x%2==0:
continue
if x > 100:
break
sum =sum +x
print sum
x = 0
while True:
x = x + 1
if x%2==0:
continue
if x > 100:
break
sum =sum +x
print sum
2016-01-17
sum = 0
x = 1
while x <= 100:
sum=sum+x
x+=2
print sum
x = 1
while x <= 100:
sum=sum+x
x+=2
print sum
2016-01-17
L = [75, 92, 59, 68]
sum = 0.0
for score in L:
sum = sum + score
print sum / 4
sum = 0.0
for score in L:
sum = sum + score
print sum / 4
2016-01-17
for x in xrange(1,10):
for y in xrange(1,10):
if x >= y:
continue
print x * 10 + y
for y in xrange(1,10):
if x >= y:
continue
print x * 10 + y
2016-01-17
for x in [1,2,3,4,5,6,7,8,9]:
for y in [1,2,3,4,5,6,7,8,9]:
if x >= y:
continue
print x * 10 + y
for y in [1,2,3,4,5,6,7,8,9]:
if x >= y:
continue
print x * 10 + y
2016-01-17
这个题很厉害,表示2.7和3.5放弃
# -*- coding: utf-8 -*-
print u'''你好
再见
不送'''
和
print(u'''你好
再见
不送''')
# -*- coding: utf-8 -*-
print u'''你好
再见
不送'''
和
print(u'''你好
再见
不送''')
2016-01-16
L = ['Adam', 'Lisa', 'Paul', 'Bart']
L.pop(2)
L.pop(3-1)
print L
L.pop(2)
L.pop(3-1)
print L
2016-01-16
L = [95.5,85,59]
print L[-3]
print L[-2]
print L[-1]
print L[-1]
print L[-3]
print L[-2]
print L[-1]
print L[-1]
2016-01-16
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.'''
2016-01-16