Commit 0083af4e by BellCodeEditor

save project

parent 220fe62b
Showing with 36 additions and 0 deletions
import random
w = input("你出什么?")
while not (w in ["石","剪","布"]):
w = input("你出什么?")
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