python Turtle set p code example

Example 1: turtle circle() python

import turtle
t = turtle.Turtle()
t.color(color) # choose a color
t.begin_fill() # if you want it to be filled with color later
t.circle(10) # the function "circle" and the radious.
t.end_fill() # completing the filling of the circle. 
# try to do it and see if it works. it worked for me.

Example 2: turtle graphics in python

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