Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Now another shapeE draws shapeD four times at different locations.  Similar with shapeD, shapeE will draw the shape of cross with the different length of sides due to the function parameter.  It looks like the below image.

Extensions:

  • extension1.py: I completed writing this code after finishing all other extensions; therefore, I am quite familiar using loop and range function.  I decided to use those functions for this extension and wanted to draw polygons that would become bigger and increase the number of sides gradually.  So I made the straight lines to bend at different angles to form triangle, square, pentagon, and hexagon.  As the image below would show, the area of the shapes will increase as the shape turns into the next one because of the loop and range function.  There are two more things to note about this shape: 1) Before the turtle draws the next polygon, it comes back to the orignial position because of the command ht().  I used this command so that the polygons would overlap with each other.  2) I set the background and pen's color as black and white so that the distinction between the polygons can become clearer.  The shape looks like below.

...

  • extension4.py: Extension4 is quite similar with shapeE in a sense that they both draw a same shape multiple times and at different locations.  Again, the result is quite different from the original shape.  One thing to note is that the original shape – pointer-looking shape – switches its angle each time in order to form a circle at the end.  This was done by loop and range function and putting specific angle.

Conclusions: