import turtle turtle.pencolor(‘red‘) turtle.fillcolor(‘yellow‘) turtle.begin_fill() while True: turtle.forward(100) turtle.right(25) if(abs(turtle.pos()))<1: break turtle.end_fill() turtle.done()
原文:https://www.cnblogs.com/liangzhenyu/p/9016840.html