Files
lab_iteration/square.py
jwberent 4b66b46496 I changed the square function to using a for-loop instead of having to write the turtle function multiple times.
Checkpoint 1:
- It wasn't that difficult for me because I have a little prior coding experience.  I tried multiple different things and realized I could make the numbers in the list the same as the parameter so each side of the square would be that number.
2025-09-11 17:35:56 -04:00

11 lines
196 B
Python

from turtle import *
def square(side_length):
sizes = [side_length, side_length, side_length, side_length]
for side in sizes:
forward(side)
right(90)
square(100)
input()