View on GitHub

python-for-kids

Learning and exercise content on Python for Kids

Turtle - Pattern with Rectangle

Like previous one where we played with Circle we can also do something similar with Rectangle.

from turtle import *

speed(12)
color("red", "yellow")
begin_fill()

for i in range(18):
    right(20)

    for j in range(2):
        forward(200)
        right(90)
        forward(100)
        right(90)

end_fill()
done()

Outcome

Pattern with Rectangle


Next: Day 26 : Turtle - Multicolor Pattern

Back to Index