Commit d9a4f3bd by BellCodeEditor

save project

parent e97ae620
Showing with 6 additions and 6 deletions
......@@ -2,13 +2,13 @@
# 于是写了下面的代码,可是总是得不到结果,请帮纠正bug并跑通程序。
scores = {'语文':89, '数学':95, '英语':80}
def get_average(scores):
scores2 ={'1':120000000000000000000000000000000000000000000000000000000000000000000,'2':2100000000000000000000000000000000000000000000000000000000000000000000000000000000000000,'3':33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333}
def get_average(scores2):
x = 0
for subject, score in scores.items():
for subject, score in scores2.items():
x = x + score
print('现在的总分是%d'%x)
ave_score = x/len(scores)
ave_score = x/len(scores2)
print('平均分是%d'%ave_score)
get_average(scores)
\ No newline at end of file
get_average(scores2)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment