Commit 07989386 by BellCodeEditor

save project

parent b5c6bbbe
Showing with 16 additions and 0 deletions
import random
l=["石头","剪刀","布"]
z=input("请选择(石头,剪刀,布):")
print("玩家出拳:"+z)
q=random.choice(l)
print(q)
if z==q:
print("平局")
elif (z=="石头" and q=="剪刀") or (z=="剪刀" and q=="布") or (z=="布" and q=="石头"):
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