From de55a916bd66a808743f375153bfbf5d662b20bc Mon Sep 17 00:00:00 2001 From: Seoyeon Lee Date: Fri, 20 Sep 2024 18:51:55 -0400 Subject: [PATCH] I had to think about the function of brackets, and I learned that the items inside of the brackets makes a list. Listing multiple items with commas does not create what we are trying to draw, we need to add 'for-loop' and the language 'for size in sizes' was not understood intuitively. I am unsure if I fully understand all of this yet, but manage to mimick the process. --- square.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/square.py b/square.py index c5f1cac..74c3ad9 100644 --- a/square.py +++ b/square.py @@ -1,16 +1,24 @@ 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) +#def square(side_length): +# forward(side_length) +# right(90) +# forward(side_length) +# right(90) +# forward(side_length) +# right(90) +# forward(side_length) +# right(90) + + + +def square(side_length): + scones = [ 20, 50, 27,8 ] + for score in scones: + forward(side_length) + right(90) sizes = [20, 40, 60, 80, 100] for size in sizes: - square(size) - + square(size) +input() \ No newline at end of file