Python Day4 Turtle模块的运用

  1. 画一个爱心
from turtle import *
def curvemove():
    for i in range(200):
        right(1)
        forward(1)
setup(600,600,400,400)
hideturtle()
pencolor('black')
fillcolor("red")
pensize(2)
begin_fill()
left(140)
forward(111.65)
curvemove()
left(120)
curvemove()
forward(111.65)
end_fill()
penup()
goto(-27, 85)
pendown()
done()

Python Day4 Turtle模块的运用

上一篇:高精度加法


下一篇:Juice-Shop 一星题