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.
the radius from the user. Then I established the variable for pi as 3.141592653.
Then I established a variable for area. It became pi * radius * radius.
Finally Print area prompted the program to calculate.
The best way I can describe it is that a vlue is the thing and the name is what we call it.
Therefore, a name does not necessarily need to relate to the thing itself, rather it is simply what
we refer to it as. One example of distinguishing the name from the value is with parents. While
their names may be something like Susan and Jim, the value assigned to them by us (their children)
is mom and dad.
Variables are useful in programming because it makes things more adaptable. When complex
data or code is housed in variables, it becomes flexible in that one does not have to
complete extensive work every time it is called upon.