Commit 8138b6bd by BellCodeEditor

save project

parent 0cdcc00d
Showing with 530 additions and 15 deletions
in = 10
for i in range(3):
day = input("今天是几号?")
if day ==in:
print("对了")
break
\ No newline at end of file
# 玩家出拳 s1 = {'语文':66,'数学':81,'英语':52}
import random s2 = {'语文':99,'数学':88,'英语':77}
player=input("你想出什么拳") s3 = {'语文':99.999999,'数学':89.999999,'英语':59.999999}
print("玩家出的拳是"+player) score = {'梁志超':s1,'奶奶':s2,'马保国':s3}
list=["石头","剪刀","布"] name = input("请输入的姓名:")
computer=random.choice(list) if name in score:
print("计算机出的拳是"+computer) score_items = score[name]
if player in list: for k,v in score_items.items():
if player==computer: print(k,v)
print("平局")
elif (player=="石头" and computer=="剪刀") or (player=="剪刀" and computer=="布") or (player=="布" and computer=="石头"):
print("玩家赢了")
else:
print("电脑赢了")
else: else:
print("老八") print("查无此人")
\ No newline at end of file
xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
x
x
x
x
x
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx
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