Commit 47feb943 by BellCodeEditor

auto save

parent 6ba133c0
Showing with 25 additions and 0 deletions
import random
score=0
while True:
player = input("请出拳""石头","剪刀","布":")
list = ["石头","剪刀",""]
computer = randdom.choice(list)
print("请玩家出拳:"+player)
print("请计算机出拳:"+computer)
if player in list:
if player == computer:
print("平局")
elif (player=="石头" and computer=="剪刀") and (player=="剪刀" and computer=="") and (player=="" and computer=="石头"):
print("恭喜你赢了")
score +=1
else:
print("很遗憾你输了")
score -=1
else:
print("输入错误")
if score>=0:
print("恭喜你赢了"+sti(score)+"")
else:
print("恭喜你输了"+sti(score)+"")
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