- This event has passed.
5 PM Intro To Python – Bill
October 13, 2021 @ 5:00 pm - 6:00 pm
Today We:
- Reviewed the Star Wars Problem Homework
- Started the Hang Man project
- Created a list of possible words
- Picked a random word out of that list as the secret word
- Learned how to use emojis or special characters using UNICODE to make a heart sign as a health symbol
- Learned how to multiply strings
- Created the life bar
Your HW:
- Copy code from Google Drive because code from class had an error. (https://drive.google.com/file/d/18wM0amJZiPneFaYUnnV_CLWVPB8N8Bj6/view?usp=sharing)
- Make the game continuously do this:
- Print out the question marks list, displayLetters
- Print out the life bar (the displayLives variable).
- Get input from shell asking for a letter or word.
- if the user input is equal to the secret word, break from the loop.
- This is the expected result you should find in the shell if your code is correct:
unicorn ['?', '?', '?', '?', '?', '?', '?'] ❤️❤️❤️❤️❤️❤️❤️❤️❤️ Enter a word or letter: fdas ['?', '?', '?', '?', '?', '?', '?'] ❤️❤️❤️❤️❤️❤️❤️❤️❤️ Enter a word or letter: abcd ['?', '?', '?', '?', '?', '?', '?'] ❤️❤️❤️❤️❤️❤️❤️❤️❤️ Enter a word or letter: unicorn You guessed the word