change turtle style python code example

Example 1: turtle python

from turtle import *
color('red', 'yellow')
begin_fill()
while True:
    forward(200)
    left(170)
    if abs(pos()) < 1:
        break
end_fill()
done()

Example 2: python turtle fan

from turtle import*
def square():
   forward(100)
   left(90)
   forward(100)
   left(90)
   forward(100)
   left(90)
   forward(100)
   left(90)
   return

color("green")
square()
exitonclick()

color('yellow')
left(10)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)

color('blue')
left(10)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)

color('black')
left(10)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)

color('pink')
left(10)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)

color('red')
left(10)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)
forward(100)
left(90)