|
1 | 1 |
|
2 | | -# 🎮 Hangman Game Challenge |
3 | 2 |
|
4 | | -Build the classic word-guessing game using Python strings, loops, and user input. |
| 3 | +# 🎮 Assignment: Hangman Game Challenge |
5 | 4 |
|
6 | | -## � What You'll Build |
| 5 | +## 🎯 Objective |
7 | 6 |
|
8 | | -Create a Hangman game where players guess letters to reveal a hidden word before running out of attempts. |
| 7 | +Build a classic Hangman game in Python to practice string manipulation, loops, conditionals, and user input. You will learn how to manage game state and interact with users through the console. |
9 | 8 |
|
10 | | -**Skills practiced:** String manipulation, loops, conditionals, random selection |
| 9 | +## 📝 Tasks |
11 | 10 |
|
12 | | -## ✅ Must Have's |
| 11 | +### 🛠️ Create the Hangman Game |
13 | 12 |
|
14 | | -Your game must: |
15 | | -- Randomly select words from a predefined list |
16 | | -- Accept letter guesses and show current progress (_ _ _ format) |
17 | | -- Track incorrect guesses remaining |
18 | | -- End when word is guessed or attempts exhausted |
19 | | -- Display win/lose messages |
| 13 | +#### Description |
| 14 | +Develop a Hangman game where the player tries to guess a hidden word by suggesting letters within a limited number of attempts. |
| 15 | + |
| 16 | +#### Requirements |
| 17 | +Completed program should: |
| 18 | + |
| 19 | +- Randomly select a word from a predefined list |
| 20 | +- Accept letter guesses from the user and display current progress (e.g., `_ a _ _ m a n`) |
| 21 | +- Track and display the number of incorrect guesses remaining |
| 22 | +- End the game when the word is fully guessed or attempts run out |
| 23 | +- Show a win message if the player guesses the word, or a lose message if they run out of attempts |
| 24 | + |
| 25 | +**Example:** |
| 26 | +```python |
| 27 | +Word: _ a _ _ m a n |
| 28 | +Guesses left: 3 |
| 29 | +Guess a letter: g |
| 30 | +Word: g a _ _ m a n |
| 31 | +Guesses left: 3 |
| 32 | +... |
| 33 | +``` |
| 34 | + |
| 35 | +### 🛠️ Enhance User Experience |
| 36 | + |
| 37 | +#### Description |
| 38 | +Add features to make the game more engaging and user-friendly. |
| 39 | + |
| 40 | +#### Requirements |
| 41 | +Completed program should: |
| 42 | + |
| 43 | +- Prevent repeated guesses of the same letter |
| 44 | +- Display all guessed letters so far |
| 45 | +- Handle invalid input gracefully (e.g., non-letter characters) |
0 commit comments