第十行为什么错了

第十行为什么错了

第10行没问题,是第9行少了一个闭括号。

>>> import math

>>> score=eval(input("Please enter all scores of a candidate:\n"))
Please enter all scores of a candidate:
100,90,95,85,80,70,80

>>> aveScore=(sum(score) - max(score) - min(score)) / (len(score) - 2)

>>> print("The final score of this candidate is {}.\n".format(aveScore))
The final score of this candidate is 86.0.

 

 

是第9行最后少了一个右括号),如有帮助,请采纳一下,谢谢。