Commit 91a2a0b3 by BellCodeEditor

save project

parent b8794e84
Showing with 14 additions and 0 deletions
import random
while True:
wj=input("输入拳名:")
quan=["石头","剪刀","布"]
jsj=random.choice(quan)
if wj in quan:
if wj==jsj:
print("平局")
elif (wj=="石头" and jsj=="剪刀") or (wj=="剪刀" and jsj=="布") or (wj=="布" and jsj=="石头"):
print("我赢了!")
else:
print("计算机赢了!")
else:
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