Commit 4efeb5b1 by BellCodeEditor

auto save

parent f2b53194
Showing with 26 additions and 4 deletions
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
import ranbum
import random
a=["剪刀","石头","布"]
b=ranbum.choice(a)
print(b )
\ No newline at end of file
b=random.choice(a)
print(b )
if player==b:
print("平局")
elif player == "剪刀" and b =="布":
print("胜利")
elif player == "石头" and b =="剪刀":
print("胜利")
elif player == "布" and b =="石头":
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