Samantha Schultz Project 1 

Abstract:

Task 1:

I created a triangle using the Turtle part of Python3. In essence, I typed in distances and angles to create a simple triangle. After defining the triangle using the tab function, I called upon the triangle in TextWrangler, then typed “python3 name of file” into the Terminal in order to pull up the image. 


Task 2:

I created a trapezoid using the same method as in task 1. In order to define the shape use the code

def triangle (): 

After that you indent in order to add a description of what a triangle is, where forward is the distance traveled forward, and left() has an angle with which to turn the turtle within the parenthesis.  

Task 3:

The next task was to combine the two shapes into a Shape Three. I did this by defining Shape Three in terms of Shape One and Shape Two. An important code to note is that 

penup() and pendown() will remove the line from drawing and place it back down. 


Task 4:


The next task was to modify one of the shapes with different parameters. I decided to recreate triangles with angles and distance changes. In order to do this I had to write both angle and distance in the parenthesis separated by commas. 

Extensions:

Extension 1:

For Extension One, I did more practice with changing the distance parameter. I created rectangles of different sizes. 


Extension 2: 

 For Extension Two, I practiced creating pentagons of different sizes using the distance parameter and changing the angles. 





Questions:

  1. What is a variable?

A variable is an undefined term that once you define you can call upon using the given name. For example, once you define a triangle, triangle becomes a variable. 

  1. What is a function and how are they useful?

A function is a procedure in Python. It understands what you type and does predetermined actions with it. 

  1. What is a parameter and how do they affect the generality of a function?

A parameter is an aspect of a function that can be altered when called upon. Or instance, in this project I altered the distance of the sides and the angles of the triangles. It creates the same shape with different criteria. 

  1. How can you use functions to create complexity with less code?

Once you establish certain code words and functions, you can create complexity with less code by using less words to describe something because you have already described it or it has a predetermined meaning. 

  1. Pick a wall drawing by Sol LeWitt that you think is interesting. Why? Do you think you could write code for it in python?

Sol LeWitt’s Drawing Number 37 is interesting because it makes shapes appear blurry by portraying them through lines. I think once I learned more I could write a code for it in Python, because it is essentially just lines turned in different directions. 


Conclusion:

I learned how to use the Turtle in Python3 in addition to the basics on how to use the Terminal. I had to learn how to fix mistakes and manage my time in order to complete the project correctly.

Acknowledgements:

Karl Hick

Riley Chenard

TA Max Abrasom

TA Izzy H

Professor Bruce Maxwell

Professor Wolfe

I watched a few How To videos on Youtube from this channel. 

https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ

Put the label cs151s20project# on your wiki page.