Go to file
Pat Wick b7d14a11d0 did both checkpoints before submitting
Sorry for that, I guess I should have realized without new changes,
committing wasn't really going to work. Anyway, the turtle by default
points toward the right, so I used a side-length-then-turn-clockwise
pattern to draw the triangle and rectangle. I did have to fix my rectangle
though; I forgot the last turn at the end, so while the test worked well,
the drawing looked like abstract art. I watched the turtle draw the shapes
on my second run of the same incorrect code and noticed the direction changed
which is how I knew what to fix.

A function is like a variable in that variables store some value, while
functions store instructions; in essence, they're both storage devices
used to make code easier/more efficient to read, write, and understand.

The small, easy problems are the basic under-defined functions that start
off the whole problem-solving process. Taking these small pieces and making
them into functions that do one specific job allow code to be tested easily
as the larger problem is still being solved and make development of code
smoother because fixing one problem (hopefully) doesn't break something else
somewhere else in the program. An example that I've used with my students
was designing a tic-tac-toe game using the turtle functions. Breaking the
(simple but) larger problem into pieces might mean "can I just draw an x"
so we wrote a function that just makes x's, then one that just made o's,
then we used those functions inside of a function that asked the user for
a position on the screen, along with another function that chose which symbol
to draw depending on the turn counter, to make the game look as intended.
2023-07-16 20:51:21 -04:00
.commit_template Initial commit 2023-07-16 20:39:12 +00:00
.gitignore Initial commit 2023-07-16 20:39:12 +00:00
circle_area.py CP1: imported math for pi, used the area formula 2023-07-16 20:35:32 -04:00
draw_with_shapes.py Initial commit 2023-07-16 20:39:12 +00:00
greetings.py CP1: imported math for pi, used the area formula 2023-07-16 20:35:32 -04:00
pyproject.toml Initial commit 2023-07-16 20:39:12 +00:00
shapes.py did both checkpoints before submitting 2023-07-16 20:51:21 -04:00
test_shapes.py Initial commit 2023-07-16 20:39:12 +00:00