generated from mwc/lab_iteration
upated comments about how tile drawing worked and
the tile funtion. Need to update square and ranges.
This commit is contained in:
5
feedback.txt
Normal file
5
feedback.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Don't forget to open the square.py file and update that function to only call
|
||||
forward and turn once. I'm looking for you to write a for loop here.
|
||||
|
||||
Start class: 1. update the square.py file with new square function.
|
||||
2. Move on to the tile section.
|
||||
@@ -8,7 +8,7 @@ def print_all_numbers(maximum):
|
||||
print(number)
|
||||
|
||||
def print_even_numbers(maximum):
|
||||
"Prints all even integers from 0 to maximum."
|
||||
"Prints all even integers from 0 to maximum. Replace pass with your own for loop"
|
||||
pass
|
||||
|
||||
def print_odd_numbers(maximum):
|
||||
|
||||
16
tile.py
16
tile.py
@@ -10,15 +10,17 @@ def draw_tile_outline(size):
|
||||
square(size)
|
||||
|
||||
def draw_squiggle(size):
|
||||
forward(size/4)
|
||||
pencolor("black")
|
||||
forward(size/2)
|
||||
pencolor("blue")
|
||||
left(90)
|
||||
quarter_arc_right(size/4)
|
||||
quarter_arc_left(size/4)
|
||||
quarter_arc_left(size/4)
|
||||
quarter_arc_right(size/4)
|
||||
quarter_arc_right(size/2)
|
||||
quarter_arc_left(size/2)
|
||||
quarter_arc_left(size/2)
|
||||
quarter_arc_right(size/2)
|
||||
left(90)
|
||||
fly(size/4)
|
||||
fly(size/5)
|
||||
left(90)
|
||||
fly(size)
|
||||
left(90)
|
||||
fly(size)
|
||||
left(90)
|
||||
|
||||
@@ -10,7 +10,10 @@ 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.)
|
||||
The code is making it go so many spaces that you put for the with-y
|
||||
and then it runs the code making it once then jumps to the next
|
||||
spot and does it again. Then runs the height and then the width again
|
||||
until its done.
|
||||
"""
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
|
||||
Reference in New Issue
Block a user