Commit 62b6ba3a by BellCodeEditor

save project

parent b5601881
Showing with 16 additions and 0 deletions
scores = {'语文':80, '数学':95, '英语':80}
def avg(scores):
sum=0
for subject, score in scores.items():
sum += score
print('现在的分数是'+ str(sum))
avgs=sum/len(scores)
print("平均分是"+str(avgs))
avg(scores)
\ 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