* 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.
This commit is contained in:
Rebecca Hankey 2024-09-10 22:00:20 -04:00
parent bda9f1414c
commit 6236c095cc
1 changed files with 14 additions and 2 deletions

View File

@ -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)