From 316e5c399ed77b6bcc7f586ecd6e30269bb87d77 Mon Sep 17 00:00:00 2001 From: Justin Toombs Date: Tue, 25 Jul 2023 09:27:34 -0400 Subject: [PATCH] Since I had already played around with this for my project, it was already a lot easier to figure out that in previous labs. I simply had to use the loop provided along with indicating a repeat of four times with the forward and right commands already present. I did encounter mild issues with forgetting a colon in a needed area, but was able to problem solve based on the error message I received. --- pyproject.toml | 2 +- square.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 square.py diff --git a/pyproject.toml b/pyproject.toml index f89db5e..604df71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" packages = [{include = "lab_iteration"}] [tool.poetry.dependencies] -python = "^3.11" +python = "^3.10" [build-system] diff --git a/square.py b/square.py new file mode 100644 index 0000000..7f522e9 --- /dev/null +++ b/square.py @@ -0,0 +1,9 @@ +from turtle import * + +def square(side_length): + for _ in range (4): + forward(side_length) + right(90) + +square(40) +done() \ No newline at end of file