Justin Waligory's CS151 Project 1
Skip to end of metadata
Go to start of metadata

For Project 1 we explored Terminal, TextWrangler, the simpleTurtle module, as well as python. The purpose was to familiarize ourselves with simple coding programs and their basic uses.

The first steps of the assignment were to create our own shapes using simple turtle and python code written in TextWrangler. For my first shape I created a simple L (See Shape A) and for my second shape I created a simply staircase (See Shape B). As you can see, the coding used for these was basic simpleTurtle commands such as forward() and right(). 

SimpleTurtle: These are the tools that we use

Our next step was to define Shapes A and B as functions in a new code, which could be combined to create a new shape, Shape C. As you can see in this snippet of code:

once Shape A and Shape B were defined as functions, we can list them under a new shape to subsequently create Shape C.

Shape A:

Shape B:

Shape C:

The last step was to create a shape that relied on parameters to determine the size of the shape created from the code. To do this I created a variable name, sideLength, which is at first left undefined.  This can all be seen in the picture of Shape E. By creating these parameters, and defining a shape as a function with them as Shape D, we could create a new shape based on a variation of variable values placed in code, which was seen in Shape E.

Shape E:


For one of my extensions I drew a robot like face using a number of different simpleTurtle code functions I wrote. In the final code, 6 different simpleTurtles functions I defined came together to create another defined function, which then allowed me to draw the face: it can be observed in this snippet of code:

I also attempted to create a set of instructions that would repeat itself infinitely, but could only get instructions for so long. I look forward to learning how to write more code.

I have included the code for these extensions in the courses directory.

From the initial project I learned the basics of coding, as well as how to use a number of important tools for Computer Scientists, such as TextWrangler and Terminal. I was able to explore python and begin to understand the program. I also learned how to edit a wiki. I think this project will help me while I am working on harder code in the future.