Here is my code:
Reflection: I’m not sure if I have said this before, but this activity was hard. The thing was I didn’t understand functions. Because I couldn’t understand how they worked, or why my attempts of functions weren’t working, it made it especially difficult to do this assignment successfully. I decided to refactor my turtle hacks assignment because I was rather proud of it and using a function would’ve been beneficial in atleast one place. Thus, I used a function to draw the mouse ears. Because I wasn’t understanding functions, Elliot sent me a program that used a function to draw 3 circles to see if I can figure out how functions worked there and to see if I can build from that. That seemed to help a ton actually. But, it was from there and the exercise description that I got the idea to use a function for the ears because they are three circles each. This also helped me realize how useful functions can be because after I included them, my code for that part became significantly shorter. The only problems I had here were moving things around, making sure that my code wasn’t redundant (the turtle circled 3 times around each shape and I wasn’t sure why until I realized I could remove more code), and making sure that it turned my circle correctly (this I found was just placement of lines of code). So I’m comfortable with how that turned out. From there, I moved on to creating another function, but I wasn’t sure where or how to include a function that returned something. It just so happened that Ben was working near me around the same time, and after talking it out to him, he made me realize that I can do something with the caption. I figured I would include another user input, and based on the input, a caption printed. I really wanted my program to be able to put the caption on the screen like I had originally, but by that, I was blanking as to how to do that with the input. I also briefly considered adding a function for the cheese, but after the difficulty I had with making them and getting them in their places, I didn’t want to compromise them in anyway. Honestly, I would just love to understand functions more, they still are quite fuzzy to me but I would love to figure it out. But for now, here ismy refactored mouse.