Lisette's Treasure Hunt Turtle

by Lisette Dunham

27 May 2017

Program:

Reflection This turtle program hides a treasure and changes from blue to red (with the major rainbow colors between) as you get closer to the color. I jumped in the deep end at first (with the animation and the onscreen click), but quickly went back to the beginning and iteratively improved the program using the user input and then switching to the onscreen clicks. I knew that I wanted to have the screen change and get a “hotter” color as the user got closer to the treasure. Generally things went smoothly as I first wrote this program. I have a couple of problems I was unable to resolve. One thing is that the program prints out text as the user clicks, but it seems to print it out a ton of times before finishing. I belive this has something to do with the traser function that draws all the lines if not turned off, though I don’t know how to solve. I also wanted the screen to start white and tried many different locations in the code to set the background color white, but since the program automatically puts Tina on the screen even before the user clicks it automatically starts with a non-white background screen color. I also wanted to clear the screen before the winning animation happens, but was unable to find a solution for that.

Lisette is a Research Data Statistical Analyst at UNC's Lineberger Comprehensive Cancer Center Find Lisette Dunham on Twitter, Github, and on the web.