Commit f34c8d37 by BellCodeEditor

save project

parent d095d5d6
Showing with 7 additions and 10 deletions
score = {'a':1,'s':2,'d':3} import random
for f in score.keys(): player = input("请出拳(石头/剪刀/布):")
print(f) print("玩家出拳:"+player)
for v in score.values(): list=["石头","剪刀","布"]
print(v) computer=random.choice(list)
for q in score.items(): print(computer)
print(f,v) \ 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