Changed the pattern inside the tile in the draw_tile() function (tile.py) and then wrote a description for the draw_tile_grid function.

This commit is contained in:
kated
2026-02-23 11:00:04 -05:00
parent 28dd24334d
commit 2c91a26176
2 changed files with 9 additions and 3 deletions

10
tile.py
View File

@@ -12,10 +12,16 @@ def draw_tile_outline(size):
def draw_squiggle(size):
forward(size/4)
pencolor("black")
for i in range(3):
left(90)
quarter_arc_right(size/4)
quarter_arc_right(size/4)
left(90)
fly(size/4)
left(90)
fly(size/4)
left(90)
quarter_arc_right(size/4)
quarter_arc_left(size/4)
quarter_arc_left(size/4)
quarter_arc_right(size/4)
left(90)
fly(size/4)

View File

@@ -10,7 +10,7 @@ from tile import fly
def draw_tile_grid(width, height, tile_size, tile_function):
"""Draws a (width x height) grid, with tile_function drawn on each tile.
(Your explanation here.)
For each height, or row of the grid, the computer draws (width) tiles from left to right, and then returns to the left side and moves up one row to draw another row of tiles until all rows have been drawn, and then the cursor returns to the start.
"""
for y in range(height):
for x in range(width):