generated from mwc/lab_names
Checkpoint 1: A value is something that is unchangable, however a name is just a pointer, or a reference for a velue. The value that is assigned to a name can be changed. Variables are useful for when you want to keep track of something that has a value which can be changed. They are also helpful for creating general programs that can solve the same problem with a different input for the variable. Checkpoint 2: A function is like a variable in that it doesn't always have the same value, and doesn't always provide the same result. Functions are useful in breaking down big problems, by deconstructing the big problem into different parts and figure out how to accomplish each part. One example is if you want to draw several houses. first you could write a function for each part of the house, such as a window, door, etc. Then write a drawHouse function which draws the house where you want it, and then lastly, you can just use the drawHouse function wherever you want a new house in the picture. |
||
---|---|---|
.commit_template | ||
.gitignore | ||
circle_area.py | ||
draw_with_shapes.py | ||
greetings.py | ||
poetry.lock | ||
pyproject.toml | ||
shapes.py | ||
test_shapes.py |