Commit 9016b948 by BellCodeEditor

save project

parent 1e08f7fe
Showing with 15 additions and 0 deletions
import random
x=input("出拳:")
xxx=["布","剪刀","石头"]
xx=random.choice(xxx)
print(xx)
if x in xxx :
if x==xx:
print("平局")
elif (x=="石头" and xx =="剪刀") or (x=="剪刀" and xx =="布") or (x=="布" and xx =="石头"):
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