import turtle
while True:
turtle.color("pink")
turtle.bgcolor('red')
turtle.forward(100)
turtle.right(132)
if abs(turtle.pos())<1:
break
turtle.done()
![](https://images2018.cnblogs.com/blog/1377912/201805/1377912-20180514164606140-1600516654.png)
![](https://images2018.cnblogs.com/blog/1377912/201805/1377912-20180514164610820-1574374346.png)
import turtle
turtle.setup(600,400,0,0)
turtle.bgcolor('red')
turtle.color('yellow')
turtle.fillcolor('yellow')
turtle.penup()
turtle.goto(-250,100)
turtle.pendown()
turtle.begin_fill()
for i in range(5):
turtle.forward(100)
turtle.right(144)
turtle.end_fill()
####
turtle.penup()
turtle.goto(-100,150)
turtle.pendown()
turtle.begin_fill()
for i in range(5):
turtle.forward(50)
turtle.right(144)
turtle.end_fill()
turtle.done()
![](https://images2018.cnblogs.com/blog/1377912/201805/1377912-20180514164640879-561208110.png)