Commit a6aab7be by BellCodeEditor

auto save

parent 6625a543
Showing with 10 additions and 8 deletions
scores={"语文":98,"数学":85,"英语":90}
v=0
for v in scores.values():
v+=v
print(v)
\ No newline at end of file
score=0
s_pingjunfen=0
for k,v in scores.items():
score+=v
print(score)
s_pingjunfen=score/3
print(s_pingjunfen)
......@@ -3,10 +3,10 @@
scores = {'语文':89, '数学':95, '英语':80}
score = 0
def get_average(abc):
for subject, score in abc.items():
def get_average(scores):
for subject, score in scores.items():
print('现在的总分是%d'%score)
score += score[]
score += score
print(subject,score)
ave_score = score/len(scores)
print('平均分是%d'%ave_score)
......
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