from turtle import * def square(side_length): for _ in range (4): forward(side_length) right(90) square(40) done()