From 6419e4e53ec9253a565436f60c2443ef1203c4b9 Mon Sep 17 00:00:00 2001 From: mbhatti4 Date: Mon, 15 Sep 2025 22:06:33 -0400 Subject: [PATCH] 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 :'( --- square.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/square.py b/square.py index f1fb2a2..9593a0d 100644 --- a/square.py +++ b/square.py @@ -1,17 +1,16 @@ 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] + +def square(side_length): + nums = [20,40,60,80,100] + for side_length in nums: + forward(side_length) + right(90) -sizes = [20, 40, 60, 80, 100] for size in sizes: square(size) -input() + forward(10) + right(90) +input() \ No newline at end of file