Commit 201b4edd by BellCodeEditor

save project

parent 2c2df58d
Showing with 23 additions and 21 deletions
# 利用write()帮助悟空给诺依回信吧~
a1=100
b1=a/2
import turtle import turtle
#定义变量
pen=turtle.Pen()
pen1=turtle.Pen()
#弹窗和背景颜色
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("black") screen.bgcolor("white")
t=turtle.Turtle() size=int(screen.textinput("爱心大小","请输入爱心大小"))
t.color("white") #文字pen
t.penup() pen.penup()
t.goto(100,-100) pen.goto(100,-100)
t.pendown() pen.pendown()
t.write("sasa\nassasa\nsasa",font=("Times",15,"normal")) pen.write("sasasas\nsdasasa\n",font=("Times",15,"normal"))
a=turtle.Pen() #爱心pen1
a.pensize(4) pen1.begin_fill()
a.color("red") pen1.color("red")
a.begin_fill() pen1.pensize(2)
a.left(45) pen1.left(45)
a.fd(a1) pen1.fd(size*2)
a.circle(b1,180) pen1.circle(size,180)
a.right(90) pen1.right(90)
a.circle(b1,180) pen1.circle(size,180)
a.fd(a) pen1.fd(size*2)
a.end_fill() pen1.end_fill()
turtle.done() turtle.done()
\ 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