Commit 1cf45b83 by BellCodeEditor

save project

parent 4703cb4a
Showing with 10 additions and 1 deletions
# 玩家出拳 # 玩家出拳
player=input("玩家请出拳石头/剪刀/布") player=input("玩家请出拳石头/剪刀/布")
print("玩家出拳"+player) print("玩家出拳"+player)
#计算机出拳 #计算机出拳
import random import random
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
computer=random.choice(list) computer=random.choice(list)
print(computer) print(computer)
if player==computer:
Print("平局")
elif if (playe=="石头"and comper=="剪刀"
print("恭喜,你赢了")
if (playe=="剪刀"and comper=="布"
print("恭喜,你赢了")
if (playe==”布”and comper=="石头"
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