Caroline's Functional Turtle Exercise

by Caroline Hall

23 May 2017

Here is my original turtle:

Here is my first turtle function involving this turtle:

Here is my second turtle function involving this turtle:

Reflection:

I’m excited about functions like this because it allows the user to easily customize the code themselves, and makes the turtle that you draw more interactive. When I first glanced over the assignment, I didn’t see the example below the initial text - so I spent a while going through and creating functions that changed the size, shape and color of a circle. After realizing that that was the example problem, I shifted gears more towards my turtle painting of a flower.

My initial thoughts immediately went to changing the color of the flower and the height of the stem. However, after playing around with the stem height for a bit, I realized that this meant that I would have to change the coordinated of every single part of the flower that had taken me so long to group and get symmetric. Therefore, I thought it would be fun to have the user be able to change the words that appear around the flower and the color of the text. Some further possibilities with this could be coding in prompts that allow the user to decide the color of each flower petal, as well as allowing the user to change the size of the font around the flower. My interpretation of return was that when you call the function, it returns the change that the user has specified within the image itself and I conceptually considered the return to be the image. I’m wondering how you would have a “return” with an image function and whether or not I did this correctly.

Caroline is a first year Information Science Master's Candidate. She is passionate about renewable energy and the environment. She spends the majority of her time outside of class working for Strata Solar, a national solar farm developer, and United Solar Initiative, an international solar nonprofit. Find Caroline Hall on Twitter, Github, and on the web.