Homework #3:
-
The task involved defining functions of shapes to then design a collection of the
shapes in a line and in a grid. First, a variety of shapes were designed using
basic commands and loops.A for loop was designed to draw the shapes in a line. Next,
Then, another document, scene1.py was created to draw two buildings in turtle. Next,
scene2.py was created to draw a series of buildings to create a cityscape. The code was
formatted to draw a grid. Linea Rooke's defined shapes were included in a line of shapes.
Various extensions were included.
-
Grid algorithim: If ten divided by i has no remainder, pick the turtle up, move
to a proportionally higher point, and put the turtle down.
-
The algorithm works because the as the function processes the information entered
for "a" (i=i+1), it keeps checking if i/10 has no remainder. i will always have a
remainder until i=10. So, when the computer executes the function using the tenth
piece of data, it follows the command and picks the turtle up, moves it to a new
location, puts the turtle down, and continues execution again until it reaches the
twentieth piece of data, when it picks up the turtle again and the cycle continues.
-
Any extensions I completed are included in my three scenes. I created many of my
own shapes and added colors. I have many more than six shapes in all of my scenes.
-
-
-