From 6236c095cc34ad0bf30d448fa8a1a6d12d5fc6c5 Mon Sep 17 00:00:00 2001 From: Rebecca Hankey Date: Tue, 10 Sep 2024 22:00:20 -0400 Subject: [PATCH] * I answered the check point one questions and submitted then. After I closed the window and reopened it for checkpoint 2 the answers were no longer there. If I need to resubmit, let me know! Thank you! A function, like a variable, renames a thing. However a variable is a smaller piece of code or informaiton, whereas a function is a larger block of code that can be called upon in different settings. When defined, functions are easily adjusted, while the rules remain the same. Functions can break down a problem into bite sized pieces and house them seperately from one another. They are executing one thing at a time. They even go as far as to further define the steps of the function itself. Therefore, when you run into problems, it is easier to isolate the issue and solve. Thinking ahead to the drawing lab, it feels like a to do list. It breaks down each section into smaller pieces. That way planning becomes easier and when things are off, you can isolate the issue. --- shapes.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/shapes.py b/shapes.py index 731ec39..64db46e 100644 --- a/shapes.py +++ b/shapes.py @@ -5,7 +5,19 @@ from turtle import * def triangle(side_length): - pass + forward(side_length) + right(120) + forward(side_length) + right(120) + forward(side_length) + right(120) def rectangle(height, width): - pass + forward(height) + right(90) + forward(width) + right(90) + forward(height) + right(90) + forward(width) + right(90)