Commit 9333b423 by BellCodeEditor

save project

parent 25abb509
Showing with 16 additions and 3 deletions
player=input("请出拳:石头/剪刀/布")# 玩家出拳 import random
print("玩家出拳:"+player)
\ No newline at end of file player = input("你要出什么:")
cn = ["石头","剪刀","布"]
cn1 = random.choice(cn)
print(cn1)
if player in cn:
if player == "剪刀" and cn1 == "布" or player == "石头" and cn1 == "剪刀" or player == "布" and cn1 =="石头":
print("胜利")
elif player == cn1:
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