Commit 98ec137f by BellCodeEditor

save project

parent 721127b5
Showing with 13 additions and 0 deletions
import random
p=input("玩家出拳(石头,布,剪刀)")
print("玩家出拳"+p)
o=["石头","布","剪刀"]
h=random.choice(o)
print("电脑出拳"+h)
if p=="石头" and h=="石头" or p=="布" and h=="布" or p=="剪刀" and h=="剪刀":
print("平局")
if p=="石头" and h=="剪刀" or p=="剪刀" and h=="布" or p=="剪刀" and h=="布":
print("你赢了")
if h=="石头" and p=="剪刀" or h=="剪刀" and p=="布" or h=="剪刀" and p=="布":
print("你输了")
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