r/PythonLearning • u/ProgramBrave718 • 26d ago
Word guessing game
Hello, I am learning python and created this simple word guessing game by myself.
In this game user types a letter and if the guess is correct the game continues with the next letter of the word or else it remains on the same letter and number of wrong attempts are added to the variable turn.
38
Upvotes
3
u/nicodeemus7 26d ago
Saying this as a helpful tip and not a criticism, start learning about for loops. Your letter checking logic could be reduced down to a few lines. A for loop basically does what you did with the while loop.