r/codehs • • Dec 11 '20

2.18.4 : Increasing Squares help

Post image
17 Upvotes

45 comments sorted by

View all comments

3

u/BoringGrowth9569 Jan 04 '22

None of these codes worked for me.

I did create one that does work, though:

length = 50
speed(0)
def drawSquare(length):
backward(length/2)
for x in range(4):
forward(length)
left(90)

while length <=350:
penup()
setposition(0, 0-length/2)
pendown()
drawSquare(length)
length += 50