import turtle def hh(er): yi = 1 while yi <= 5: turtle.forward(er) turtle.right(144) yi = yi + 1 #yi += 1 def nb(er): """ 迭代绘制五角星 """ yi = 1 while yi <= 5: turtle.forward(er) turtle.right(144) yi = yi + 1 # yi += 1 er +=10 if er <=100: nb(er) def main(): er = 50 nb(er) turtle.done() if __name__ == '__main__': main()