我的答案:
import turtle as t
t.pencolor('red')
for i in range(5):
t.forward(100)
t.right(144)
嵩天老师的优秀答案:
from turtle import *
fillcolor("red")
begin_fill()
while True:
forward(200)
right(144)
if abs(pos()) < 1: #查看画笔是否回到原点,回到原点时为真
break #回到原点,跳出循环
end_fill()
begin_fill() pos() end_fill() 均为turtle库内的函数。