Commit 6afd70d8 by BellCodeEditor

save project

parent 7325df51
Showing with 11 additions and 7 deletions
playr = input("请出拳(石头/剪刀/布)") scores = {'语文':89, '数学':95, '英语':80}
print("玩家出拳"+playr)
import random def get_average(scores):
list=["石头","剪刀","布"] sum_score = 0
computer=random.choice(list) for subject, score in score.items():
print(computer) sum_score += score
\ No newline at end of file print('现在的总分是%d'%sum_score)
ave_score = sum_score
print('平均数是%d'%ave_score)
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