generated from mwc/lab_iteration
	Yes! I think once we start coding longer programs, it would be super helpful for me to use docstrings to explain to myself what each function does.
If you have loads of functions, they can start not making sense if you are just looking at the code.
This commit is contained in:
		@@ -10,7 +10,12 @@ 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.)
 | 
			
		||||
    This code draws the grid of the tiles. It takes the width, height and tile size and creates a grid that matches.
 | 
			
		||||
    Everytime it finishes a tile, it goes back the origin of the square to then continue to the next tile.
 | 
			
		||||
    Once it finishes the row, it goes back to the origin of the first tile to then build up the next row.
 | 
			
		||||
    At the end of drawing all the tiles, it moves the pen back to the origin.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    """
 | 
			
		||||
    for y in range(height):
 | 
			
		||||
        for x in range(width):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user