Summary
Hangman-Game.py declares 13 variables as global at the top of main(), but none are used outside the function. The comment even notes they are "not strictly necessary". This is unnecessary and makes the code harder to read.
Fix
Removed the global statement since all variables are local to main().
How to Test
- Run
python games/Hangman-Game/Hangman-Game.py
- Play a round to verify the game works correctly
- Confirm no NameError or behavior changes
GSSoC 2026
Summary
Hangman-Game.pydeclares 13 variables asglobalat the top ofmain(), but none are used outside the function. The comment even notes they are "not strictly necessary". This is unnecessary and makes the code harder to read.Fix
Removed the
globalstatement since all variables are local tomain().How to Test
python games/Hangman-Game/Hangman-Game.pyGSSoC 2026