Now that you've learned all the pieces that made up the guess-the-number game, it's time to build your own CLI game with Python!
Hangman
Hangman is another classic game! Your task for this project is to create a CLI game that allows a user to guess the letters of a pre-defined word. They should have a set amount of tries to guess the full word before they lose and have to suffer their unfortunate fate:
Photo by M Ashraful Alam https://unsplash.com/@ashrafsazid
You can implement this game however you want to. Don't try to make it too complicated yet! You can come back to your game and make it more interesting later on. Start by building a basic, but functional implementation.
For example, you could start with this pseudocode:
# Hard-code a word that needs to be guessed in the script
# Print an explanation to the user
# Display the word as a sequence of blanks, e.g. "_ _ _ _ _" for "hello"
# Ask for user input
# Allow only single-character alphabetic input
# Create a counter for how many tries a user has
# Keep asking them for their guess until they won or lost
# When they find a correct character, display the blank with the word
# filled in, e.g.: "_ e _ _ _" if they guessed "e" from "hello"
# Display a winning message and the full word if they win
# Display a losing message and quit the game if they don't make it
Unfortunately, it won't be too exciting for you to play this game---because you'll already know the word that should be guessed. But you can think of a fun word and then let your friends play the game :)
Challenge
If you want to practice your online research skills, then explore some possible ways to get a word into your game that you don't know yourself. That would make it a lot more fun to play the game by yourself.
Don't worry if you don't know how to do this yet, and don't get stuck on it. This is a stretch goal and you can come back and build on top of your basic game implementation later on after you've progressed further with your Python skills.
Iterating over projects that you started earlier is a great way to keep revisiting concepts and expanding on your knowledge. Never shy away from building a small version first, and coming back later to make it better.