import turtle
turtle.pencolor('red')
turtle.fillcolor('yellow')
turtle.begin_fill()
while True:
turtle.forward(100)
turtle.right(49)
if abs(turtle.position())<1:
break
turtle.end_fill()
turtle.done()
![](https://images2018.cnblogs.com/blog/1380140/201805/1380140-20180509210443568-2071220354.png)
import turtle
turtle.bgcolor('red')
turtle.pencolor('yellow')
turtle.fillcolor('yellow')
turtle.begin_fill()
turtle.forward(300)
turtle.right(144)
turtle.forward(300)
turtle.right(144)
turtle.forward(300)
turtle.right(144)
turtle.forward(300)
turtle.right(144)
turtle.forward(300)
turtle.right(144)
turtle.end_fill()
turtle.done()
![](https://images2018.cnblogs.com/blog/1380140/201805/1380140-20180509211059722-1655897872.png)