看到别人画的小猪佩奇,想起之前画的小乌龟了,就拿你练手了,哈哈
一个小时的成果,有点丑
源码:
#!python 3.8.1
"""画一个小乌龟"""
import turtle as t;
t.pensize(2)
t.hideturtle()
t.colormode(255)
t.color((0,0,0),"Green")
t.setup(500,500)
t.speed(5)
t.penup()
t.goto(0,-100)
t.pendown()
t.circle(100)
t.penup()
t.goto(-20,35)
t.pendown()
t.begin_fill()
t.forward(40)
t.seth(-60)
t.forward(40)
t.seth(-120)
t.forward(40)
t.seth(-180)
t.forward(40)
t.seth(120)
t.forward(40)
t.seth(60)
t.forward(40)
t.end_fill()
t.seth(120)
t.color((0,0,0),(29,184,130))
for i in range(6):
t.begin_fill()