Commit 0fdc4dc6 by BellCodeEditor

auto save

parent a12bbd64
Showing with 26 additions and 0 deletions
...@@ -11,4 +11,29 @@ def get_average(scores): ...@@ -11,4 +11,29 @@ def get_average(scores):
ave_score = h/len(scores) ave_score = h/len(scores)
print('平均分是%d'%ave_score) print('平均分是%d'%ave_score)
get_average(scores)
scores = {'b':8900000000000000000000000000000000000, 'fg':9500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 'po':80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000}
def get_average(scores):
h = 0
for subject, score in scores.items():
h = h + score
print('现在的总分是%d'%h)
ave_score = h/len(scores)
print('平均分是%d'%ave_score)
get_average(scores) get_average(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