Commit ce18f42a by BellCodeEditor

auto save

parent b5c6bbbe
Showing with 21 additions and 0 deletions
# 玩家出拳
while True:
s=input("请输入石头/剪刀/布 ")
print("玩家1 出拳:" + s)
# 计算机出拳
import random
list = ["石头","剪刀","布"]
n=random.choice(list)
print("玩家2 出拳:" + n)
if s in list:
if s == n:
print("平局")
elif (s == "石头" and n == "剪刀") or (s == "剪刀" and n == "布") or (s == "布" and n == "石头"):
print("恭喜,你赢了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
else:
print("很遗憾,你输了!!!!!!!!!")
else :
print("输入错误!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
\ No newline at end of file
This diff is collapsed. Click to expand it.
import turtle
\ 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