diff --git a/diy1.py b/diy1.py index ce831b6..32b42fc 100644 --- a/diy1.py +++ b/diy1.py @@ -2,10 +2,10 @@ # 于是写了下面的代码,可是总是得不到结果,请帮纠正bug并跑通程序。 scores = {'语文':89, '数学':95, '英语':80} - +score=100 def get_average(scores): score = 0 - for subject, score in scores.items(): + for subject,score in scores.items(): score += score print('现在的总分是%d'%score) ave_score = score/len(scores)