Python 函数计算三门课程总分和平均值
def calculate_score(score1, score2, score3): total_score = score1 + score2 + score3 average_score = total_score / 3 print('成绩总和:', total_score) print('平均成绩:', round(average_score, 1))
score1 = int(input()) score2 = int(input()) score3 = int(input())
calculate_score(score1, score2, score3)
原文地址: https://www.cveoy.top/t/topic/n3so 著作权归作者所有。请勿转载和采集!