Class Hack

Due Tue, Jun 12, 2018 at Start of Class

Submit a well-formatted pull request to our class blog with embedded Trinket programs for the assignment below. Complete this on your own, using any class materials you need (including the additional resources on the syllabus). Do not look at other students’ submissions until after you’ve completed your work.

In your program, remember to leave comments via Python’s # or using Trinket’s inline comments.

After your programs are done, check other students’ work and other resources online if you had questions. Include a reflection about what you think you’ve learned and any concepts that are still fuzzy to you. Did you encounter frustrating situations? Did you feel a lightbulb turn on?

__

Make a hack of one of your previous trinkets that uses classes. This can be Turtle or text-based. Your class can be constructed from scratch or extended from a built-in class. For Turtle Finals, I HIGHLY recommend wathcing the portions of my video that deal with class extension. Even if you’re doing a text-based final, you can complete this with Turtle, but it might be more helpful to do it in a text-based way so that it’s translateable to the requirements of your final.

The purpose of this exercise is to get you hands-on with classes in a program you’re already familiar with so that it’s easier to incorporate them into your final. It should be a combination of a refactor (an improvement to code style that doesn’t change functionality) and an improvement to the original, using the possibilities of classes.

Elliott Hauser is a PhD Student in information science at UNC Chapel Hill. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.