(guess)
| 2 | |
| 3 | # Function to check if a character is a valid lowercase letter |
| 4 | def is_valid_guess(guess): |
| 5 | return guess.isalpha() and guess.islower() and len(guess) == 1 |
| 6 | |
| 7 | # Function to display the current state of the word with placeholders for unguessed letters |
| 8 | def display_word(secret_word, guessed): |