Commit beb5df26 by BellCodeEditor

save project

parent 220fe62b
Showing with 42 additions and 0 deletions
from random import random
from tkinter import W
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()
\ 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