import turtle def square(length): for i in range(4): turtle.forward(length) turtle.left(90) square(50)