Commit bddcd6ef by BellCodeEditor

save project

parent 3c58ece3
Showing with 10 additions and 25 deletions
# 玩家出拳 # 导入turtle模块
a=0 import turtle
f = input("石头","剪刀","布") #创建画笔
print("玩家出拳:"+f) pen=turtle.Pen()
import random pen.write("666666 \n4444 \n88888888 \n648",font=("Times",30,"normal"))
l=["石头","剪刀","布"] #隐藏画笔
s = random.choice(l) pen.hideturtle()
print(s) #保存画布
while (not f in l) and a<5: turtle.done()
f = input("石头","剪刀","布") \ No newline at end of file
a=a+1
if f in l:
if f == s:
print("平局")
elif f =="石头" and s=="剪刀":
print("你赢了")
elif f=="布" and s=="石头":
print("你赢了")
elif f=="剪刀" and s=="布":
print("你赢了")
else:
print("你输了")
else:
print("你SB,输错了")
\ 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