Files
lab_iteration/square.py
mbhatti4 6419e4e53e This was a tough code for me
I attempted to add a for loop to avoid writing forward and right more than once
in the end, the code didn't work but I couldnt figure it out

Checkpoint #1:
Yes, it was. I did not figure it out. Im sure its an easy fix, but I couldnt do it :'(
2025-09-15 22:06:33 -04:00

16 lines
254 B
Python

from turtle import *
sizes = [20,40,60,80,100]
def square(side_length):
nums = [20,40,60,80,100]
for side_length in nums:
forward(side_length)
right(90)
for size in sizes:
square(size)
forward(10)
right(90)
input()