Commit df7deac9 by BellCodeEditor

auto save

parent aa63e7ae
Showing with 25 additions and 23 deletions
# 利用write()帮助悟空给诺依回信吧~ p=["石头","剪刀","布"]
import turtle a=input('')
screen=turtle.Screen() import random
screen.bgcolor("light blue") q=random.randint(0,2)
len=screen.textinput("提示","你想要多大的爱心呀?") if p[q]=="石头":
len=int(len) if a=="石头":
pen=turtle.Pen() print("平局")
pen.write("你好/nfuck.",font=("Times",30,"normal")) if a=="剪刀":
pen.hideturtle() print("你输了")
len=60 if a=="布":
pen.penup() print("你赢了")
pen.goto(100,100) if p[q]=="剪刀":
pen.pendown() if a=="石头":
pen.pensize(5) print("你赢了")
pen.pencolor("red") if a=="剪刀":
pen.left(45) print("平局")
pen.forward(2*len) if a=="布":
pen.circle(len,180) print("你输了")
pen.right(90) if p[q]=="布":
pen.circle(len,180) if a=="石头":
pen.forward(2*len) print("你输了")
turtle.done() if a=="剪刀":
\ No newline at end of file print("你赢了")
if a=="布":
print("平局")
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