Commit 4f329636 by BellCodeEditor

save project

parent 654bc3ba
Showing with 26 additions and 0 deletions
import turtle#导入海龟1(背景,写字)
screen=turtle.Screen()#1.背景
screen.bgcolor("pink")
pen=turtle.Pen()#2.写字
pen.penup()
pen.goto(100,-100)
pen.write("你好,诺依!"font=("Times",30,"normal"))
pen.hideturtle()
import turtle#导入海龟2(爱心)
pen1=turtle.Pen()
pen1.pencolor("red")
pen1.pensize(20)
pen1.fillcolor("red")
pen1.penup()
pen1.goto(-50,50)
pen1.pendown()
pen1.begin_fill()
pen1.left(45)#爱心初始角度
pen1.forward(100)#爱心的直线1
pen1.circle(50,180)#爱心的半圆1
pen1.right(90)#爱心半圆间的角度
pen1.circle(50,180)#爱心的半圆2
pen1.forward(100)#爱心的直线2
pen1.hideturtle()
pen1.end_fill()
turtle.done()
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