正确答案
L = [75, 92, 59, 68]
sum = 0.0
for score in L:
sum=sum+score
print sum / 4
L = [75, 92, 59, 68]
sum = 0.0
for score in L:
sum=sum+score
print sum / 4
2020-02-17
正确答案
t = ('a', 'b', ('A', 'B'))
print t
t = ('a', 'b', ('A', 'B'))
print t
2020-02-17
正确答案
L = ['Adam', 'Lisa', 'Paul', 'Bart']
L.pop(2)
L.pop(2)
print L
L = ['Adam', 'Lisa', 'Paul', 'Bart']
L.pop(2)
L.pop(2)
print L
2020-02-17
正确答案
L = ['Adam', 'Lisa', 'Bart']
L.insert(2,'Paul')
print L
L = ['Adam', 'Lisa', 'Bart']
L.insert(2,'Paul')
print L
2020-02-17
提交作业:
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.'''
注意事项:将作业要求的内容先复制,将已经转义 的转义符删除,仅仅保留需要输出的原始内容,
2020-02-17
思考
age = 8
if age >= 18:
print 'teenager'
elif age >= 6:
print 'adult'
else:
print 'kid'
age = 8
if age >= 18:
print 'teenager'
elif age >= 6:
print 'adult'
else:
print 'kid'
2020-02-15
只要加' '的都会原封的打印出来,不加' '的只能是数值,并且会直接计算出结果。
2020-02-15