Editor

Squares Inside Squares

Draw this picture · Advanced · about 10 min

Draw 5 squares that all have their center where the turtle starts, with sides of 40, 80, 120, 160 and 200. Every square has horizontal and vertical sides, like the edges of the screen.

The outline colors alternate from the smallest square outward: red, blue, red, blue, red. There are no fills and no lines between the squares.

The picture
Your drawing

Run your program to see it here.

import turtle
t = turtle.Turtle()
sizes = [40, 80, 120, 160, 200]
The solution opens after your first Check.