3.1.4. Draw a square spiral

The code below draws a spiral. See if you can understand what the code does and write your own version. If not, copy the code and see what happens. Can you change parts of the code to create a different outcome?

import turtle
pen=turtle.Turtle()
x=10
y=10
for i in range(0,5):
    pen.forward(x)
    pen.right(90)
    pen.forward(x)
    pen.right(90)
    x=x+y
    pen.forward(x)
    pen.right(90)
    pen.forward(x)
    pen.right(90)
    x=x+y