解析:首先需要从键盘输入8位评委的整数分数,然后去掉最高分和最低分,最后计算平均得分并输出。 代码如下: ```python def main(): scores = input("请输入8位评委的整数分数,用逗号分隔:") scores_list = [int(score) for score in scores.split(',')] max_score = max(scores_list) min_score = min(scores_list) scores_list.remove(max_score) scores_list.remove(min_score) average_score = sum(scores_list) / len(scores_list) print("去掉最高分和最低分后的平均得分为:", average_score) if __name__ == "__main__": main() ``` [2024-06-23 22:52:53 | AI写代码神器 | 192点数解答]