The key purpose of the assignment was to familiarize the student with basic commands in python and in the terminal, such as with giving simple commands and creating simple functions while making use of parameters. While using the turtle program, the student could define shapes and strings of commands in order to make use of them multiple times. The project began by asking for me to develop several simple shapes, combine those shapes, and then manipulate them in various ways.
In order to describe the circle, I wrote 'forward (5) right (2),' copied and pasted it, and copied and pasted that in order to exponentially write out the requisite number (180) of line segments needed to make a full circle.
I wanted to make a suitable additional shape, though nothing came to mind outside of triangles and multi-sided shapes, which plagued my consciousness after I glanced at the list of extensions, so I combined the two into a simple star. I knew stars had an inner angle of 36°, which meant that I had to put in five turns of 'right (154)' to make tat turn from the outside angle. The star is red because I came up with a masterful combination midway through that I am planning for my third shape.
The third shape was simple in theory, though difficult in practice, as I had to get the two to be roughly the same size, and start the procedure for the star at precisely the right angle. This required several iterations of editing the code by one digit at a time, running it, and trying again and again. To achieve this, I used variables 'size' and 'length' to modify multiple components of the code at once.
Ah. It turns out I did shapeFour as part of shapeThree, since I was using the variables to get my shape to line up correctly, so here are two examples of my work. Once I figured out the correct ratio of size to length, I input those numbers farther back in the code so I could reduce them both to the same variable of 'size.'
In order to accomplish shapeFive, I added several of them to the original shapeThree with different locations and sizes. As the turtle ends up pointing in another direction after every pentagram, I did not need to add any 'turn' commands as part of shapeFive. I simply used 'penup' and 'pendown' to create multiple shapes on the same line.
Nth sided shape
I took a fair amount of time to discover the method required in order to make an Nth sided shape. I was sucked into the world of variables, and while describing the process necessary for making the internal angle was incredibly simple, (360/n, simple math), it took me forever to discover how to make multiple commands, such as 'move' and 'turn' in order to complete the shape. Despondent, I turned to John Conners, a friend and dorm-buddy, as I knew he was knowledgeable in the ways of computers. He pointed me in the way of 'for loops,' and I found myself at the door of Hannah, begging for her help. She, in turn, aimed me towards online resources which I used to teach myself the ways of the loop. And so I made shapes.
This project, while fun, was a good intro to CS 151. It forced me to move carefully, think outside the box, and to ask for help. I learned how to draw using turtle, how to draw instantly, how to color the pen line, how to loop functions, how to use multiple variables, how to do basic math in python, and how this is going to be an interesting course.
John Conners, Hannah Wolfe, Bruce Maxwell, Bruce Maxwell's cookies, Sam Schultz