Commit 78291d49 by BellCodeEditor

save project

parent 79d0297a
Showing with 31 additions and 10 deletions
import random import random
# 玩家出拳 w = input("你出什么?")
w = input("你出什么?石/剪/布:") while not (w in ["石","剪","布"]):
print("玩家出的是----"+ w ) w = input("你出什么?")
d = random.choice(["石","剪","布"])
print("电脑出的是----"+ d )
print("玩家出的是---" + w)
d = random.choice(["石","剪","布"])
print("电脑出的是---" + d)
if w == "布":
if d == "布":
print("平局!")
elif d == "剪":
print("输了!")
elif d == "石":
print("赢了!")
if w == "剪":
if d == "剪":
print("平局!")
elif d == "石":
print("输了!")
elif d == "布":
print("赢了!")
if w == "石":
if d == "石":
print("平局!")
elif d == "布":
print("输了!")
elif d == "剪":
print("赢了!")
input()
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