From bcb73d5dc7a5627b977e8d4a18435367ab6f6b29 Mon Sep 17 00:00:00 2001 From: juddin2 Date: Sun, 14 Sep 2025 15:39:39 -0400 Subject: [PATCH] I used for loop to loop the square 4 times instead of just writing it 4 times. It wasnt't that difficult. I took CSE 115 over the summer where we learned python.I just used the note for the class to refreash my knowledge of loop. --- square.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/square.py b/square.py index f1fb2a2..8c3c450 100644 --- a/square.py +++ b/square.py @@ -1,17 +1,10 @@ from turtle import * def square(side_length): - forward(side_length) - right(90) - forward(side_length) - right(90) - forward(side_length) - right(90) - forward(side_length) - right(90) - -sizes = [20, 40, 60, 80, 100] -for size in sizes: - square(size) -input() - + for i in [1,2,3,4]: + forward(side_length) + right(90) +square(200) +square(150) +square(100) +square(50)