Versions Compared


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

These are the tools we use.

For this assignment, we were using the Python programming language through TextWrangler to make basic shapes using Python turtle commands. The turtle takes basic commands like "forward (100)" which tells the turtle to draw a line 100 pixels long in the direction it is currently facing, and "left (90)", which tells it to rotate 90 degrees counterclockwise. This assignment introduced us to basic Python code, such as "from turtle import *", which allows us have access to all of the commands the turtle can be given. 

In class, I made a square and a hexagon. For the remainder of the project, I created a cross, an "L", and a repeated shape. To start off all of the shapes I made, I first had to call the turtle using the Python command "from turtle import *", which allowed me to access all of the turtle commands, with the asterisk representing "all." The last line of code was always "raw_input  ("Press Return when ready"), or something similar, which prompts the user to press the return key to close the turtle canvas; otherwise, the drawing would disappear very quickly, making it hard to see.

To design the cross (shapeA), I followed the same general pattern of the square-making code, except that instead of turning left all the time, the turning pattern would be left-left-right, which makes the turtle constantly draw three sides of a square, but never fully close it, instead linking it together with others of its kind. Designing the "L" shape(shapeB) was similar, except that I closed off the shape instead of continuing with the left-left-right pattern and I had different "forward" values, which means the sides had different lengths.  For task 5,