generated from mwc/lab_iteration
Started out with repetitive code to draw shapes, then used "ranges" to simplfy code drawing shapes and print numbers (even, odd, multiples), and experimenting with a complicated set of ranges drawing tiles with patterns. Checkpoint 1 - Yes, at first it was difficult drawing squares using a for-loop. I understood the definition of "square" with a for-loop in range of 4, the 4 sides using once each, forward and right. I didn't realize that the sizes = [20, 20, 20, 20] needed to be included within the code where it tells "for size in sizes" the square size and move forward to draw the next square. I reviewed the Iteration documentation several times and online, docs.python.org/3/library/turtle.html. Also, I asked you for assistance and then it made sense. Checkpoint 2 - I liked using “ranges” to generate a sequence of numbers and simplifying repetitive code. - Defining the sizes for a def and range. Such as "def square(side_length)". I see it's reference in "forward(side_length)", but (side_length) it seems arbitrary and abstract. Is it how to best describe what the "def" is. Are we talking about the name and value? And then defined within a "for-loop" incorporating a "range"? Checkpoint 3 - Yes, I will write docstrings when writing programs. The docstrings good for writing multiple lines of information explaining the code function by using """ at the beginning and end of the lines instead of " for each line. -Docstrings were useful with typing the explanation in tile_grid.py and experimented information in tile.py files. |
||
---|---|---|
__pycache__ | ||
.DS_Store | ||
.commit_template | ||
draw_shapes_inside_shapes.py | ||
drawtiles.py | ||
experimenting_circles.py | ||
poetry.lock | ||
pyproject.toml | ||
ranges.py | ||
square.py | ||
square_lists_drawing_squares.py | ||
square_multiple pen up n down.py | ||
square_sidebyside.py | ||
square_test_with_space_inbetween.py | ||
square_with_space_inbetween.py | ||
tile.py | ||
tile_grid.py | ||
tile_new_pattern.py |