Erica's Treasure Hunt

by Erica Brody

23 Jan 2016

Here is my Treasure Hunt program:

Reflection: Although I wanted to start programming right away, I realized that I had to take a few minutes away from Trinket, and think about the specific steps that I needed to do to get to the goal. In particular, it really helped to draw out an example of what I needed to do. For example, I drew a grid and a point for the treasure and an input point to identify the coordinates of the third point of a right triangle to get the numbers I needed to use the Pythagorean theorem to calculate the distance between the two points. I also spent a fair bit of time thinking about where to put statements with respect to loops. Initially, I put a copy of the same statement into three consecutive if/elif/elif statements and then realized that I could put that statement outside of the three loops and the program would work the same way with fewer lines of code. I chose to create turtle stamps for each guess and to print the distance betwen the points for each guess to help users find the treasure faster. I am not sure how helpful the stamps are and they can get kind of garbled on the screen when guesses are close to each other, but I like the visual.

I am a library science student, focused on health information. I am dabbling in information science this semester. Find Erica Brody on Twitter, Github, and on the web.