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.'''
2017-02-17
我把sum=sum+x与x=x+2弄反了,系统居然通过了,但是计算结果并不同,一个是2600,一个是2500,如果x=x+2在前的话,就是从3到101,因为99也小于100,但是总和确加到了2600,所以还是有很大区别的!
2017-02-17
这点不合适print "Learn Python in imooc" 和print "Learn Python in imooc。"
2017-02-17
最新回答 / 如风3162636
一、Python对象要理解这个,首先要理解Python对象:python对象具有三个特性:身份、类型、值。三特性在对象创建时被赋值。只有值可以改变,其他只读。类型本身也是对象。二、Null与None是Python的特殊类型,Null对象或者是None Type,它只有一个值None.它不支持任何运算也没有任何内建方法.None和任何其他的数据类型比较永远返回False。None有自己的数据类型NoneType。你可以将None复制给任何变量,但是你不能创建其他NoneType对象。>>>...
2017-02-17
sum = 0
x = 1
n = 1
while True:
sum=sum+x
x=x*2
n=n+1
if n>21:
break
print sum
x = 1
n = 1
while True:
sum=sum+x
x=x*2
n=n+1
if n>21:
break
print sum
2017-02-17
sum = 0
x = 1
while x<100:
sum=sum+x
x=x+2
print sum
x = 1
while x<100:
sum=sum+x
x=x+2
print sum
2017-02-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
2017-02-17