- This event has passed.
6 PM – Python OOP – Shawn
August 11, 2023 @ 5:00 pm - 6:00 pm
Today We Did
- Reviewed homework
- Did 9-7 on page 173 in the textbook
- Started first half of the Hangman project
Homework
- Continue with Hangman hangman.py and finish the entire program:
- In application loop, have the following logic after the user input:
- If user input is equal to the secret word, break
- Else if user input is not a letter in the secret word, subtract one to the lives
- Otherwise, update your clues accordingly (replace the ? with the letter you correctly guess!)
- If you run out of lives, break out of the loop
- If you win (if there aren’t any question marks left in your clues), also break out of the loop
- Print out a message either saying that you won or lost
- In application loop, have the following logic after the user input:
If you have any questions, feel free to email me at szhuang@ayclogic.com.