We use the class definition syntax that we learned from the previous lecture to build a game! First we'll design the class, i.e., our own custom type; then we implement the class in order to create a word guessing game. Along the way, we discuss how to overload special methods.
Review the slides, examples, and your notes from the previous lecture (Lecture 17) so that you are ready to apply what was discussed. Did you answer the two questions at the end of those lecture slides? Be sure to do them!
AND read 17.6 - 17.12
Answers to the questions on slides 29 and 31: First try to complete the implementation of class
SecretWord in the file wordGuesss.py (skeleton file given above). Afterwards take a look at our version.
After lecture, watch this 8-minute video on operator overloading.