Commit 201b4edd by BellCodeEditor

save project

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