Commit c00085b3 by BellCodeEditor

save project

parent 76106d53
Showing with 10 additions and 7 deletions
import random
list=["石头","剪刀","布"]
player1=input("玩家出拳(石头/剪刀/布)")
print("玩家出拳:"+player1)
list=["石头","剪刀","布"]
player2=random.choice(list)
print("赌怪卢本伟向你发起石头剪刀布挑战:"+random.choice(list))
if player1==player2:
if player1 in list:
player2=random.choice(list)
print("赌怪卢本伟向你发起石头剪刀布挑战:"+random.choice(list))
if player1==player2:
print("平局,不错")
elif(player1=="石头" and player=="剪刀") or (player1=="布" and player2=="石头") and (player1=="剪刀" and player2=="布"):
elif(player1=="石头" and player=="剪刀") or (player1=="布" and player2=="石头") and (player1=="剪刀" and player2=="布"):
print("你赢了,赌怪表示不服,并想要与你再来一次")
else:
else:
print("你输了,惩罚是吃掉你自己的电脑")
else:
print("因为你在直播间散播不符合“石头剪刀布”比赛规则的相关行为,已将你逐出“赌怪卢本伟”的直播间")
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