Commit 8b31065b by BellCodeEditor

save project

parent b5c6bbbe
Showing with 20 additions and 0 deletions
A=["石头","剪刀","布"]# 玩家出拳
S=input("玩家请出拳(石头,剪刀,布)")
if S in A:
print("玩家出拳:"+S)
import random
b=random.choice(A)
print("电脑出拳:"+b)
if S==b:
print("平局")
elif S=="石头" and b=="剪刀":
print("恭喜你赢了")
elif S=="布" and b=="石头":
print("恭喜你赢了")
elif S=="剪刀" and b=="布":
print("恭喜你赢了")
else:
print("你输了")
else:
print("输入错误")
\ 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