这是啥问题啊?
>>> L = [75, 92, 59, 68, 99]
>>> sum = 0.0
>>> for x in L:
... sum = sum + x
... print(sum / 5)
File "<stdin>", line 3
print(sum / 5)
^
SyntaxError: invalid syntax
>>>
>>> L = [75, 92, 59, 68, 99]
>>> sum = 0.0
>>> for x in L:
... sum = sum + x
... print(sum / 5)
File "<stdin>", line 3
print(sum / 5)
^
SyntaxError: invalid syntax
>>>
2021-01-06
举报