Commit 07c0e1d9 by BellCodeEditor

save project

parent 225c0202
Showing with 16 additions and 0 deletions
import random
palyer=input("出拳")
print("玩家"+palyer)
abc=["剪刀","石头","布"]
computer=random.choice(abc)
print("计算机 "+computer)
if palyer in abc:
if palyer==computer:
print("平局")
elif (palyer=="剪刀" and computer=="布") or (palyer=="布" and computer=="石头") or (palyer=="石头" and computer=="剪刀"):
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