这题的判定有BUG,使用下面代码也可以通过
sum = 0
x = 1
while x <= 100:
sum += x%2==1
x+=1
print sum
sum = 0
x = 1
while x <= 100:
sum += x%2==1
x+=1
print sum
2015-03-13
but the true answer is below: (i don't think it's truth.)
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.'''
2015-03-13
like below:
print r''''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.' '''# <--space
I think should a space in the end.
print r''''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.' '''# <--space
I think should a space in the end.
2015-03-13
the answer should have ' ' use to bracket all string.
2015-03-13
print [x*100 + y*10 + z for x in range(10) for y in range(10) for z in range(10) if x > 0 and x == z]
2015-03-12