Commit 364be857 by BellCodeEditor

save project

parent 07858a54
Showing with 26 additions and 0 deletions
import turtle
#定义变量
pen=turtle.Pen()
pen1=turtle.Pen()
#弹窗和背景颜色
screen=turtle.Screen()
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