Commit 68fad9f0 by BellCodeEditor

save project

parent b5c6bbbe
Showing with 17 additions and 0 deletions
# 玩家出拳
import random
a=input("你要出啥")
print("玩家出拳:"+a)
b=["石头","剪子","布"]
com=random.choice(b)
print("电脑出拳"+com)
if a in b:
if a == com:
print("平局")
elif (a=="石头" and com=="剪刀")or(a=="剪刀" and com=="布")or(a=="布" and com=="石头"):
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