Commit f9ac2a96 by BellCodeEditor

auto save

parent b59b08c3
Showing with 12 additions and 6 deletions
player=input("剪刀 石头 布")
print("玩家出拳:"+player)
p=input("玩家出拳:")
print("玩家:"+p)
import random
SB= ["石头","剪刀","布"]
SB=random.choice(SB)
print("电脑"+SB)
\ No newline at end of file
d=["石头","剪刀","布"]
d=random.choice(d)
print("电脑"+d)
if p==d:
print("平局")
elif (p=="布"and d=="石头") or (p=="石头" and d=="剪刀") or (p=="剪刀" and d=="布"):
print("玩家赢")
elif (d=="布"and p=="石头") or (d=="石头" and p=="剪刀") or (d=="剪刀" and p=="布"):
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