I created Hangman as a Python Terminal Game!

Hello! I used the final project to make hangman! You can view it from my GitHub account! Thank you to anyone who reads this and checks out what I have done.

Hello!

Some advices for this and future projects:

  1. Try to avoid global variables. If your function needs data - pass it through parameter.
  2. Extract functions from your code with meaningfull names like validate_input and print_rules. This will make code more readable.
  3. Give user ability to exit game at any time without using Ctrl+C. For example by entering exit keyword.
  4. Validate user input length instead of simply use first letter. So your app behavior will be more predictable.
  5. Use single constant for maximum mistakes and guesses count. So you can change it in single place instead of search over all code for value replacing (including rules). And your variables mistakes and remaining_guesses have single puprose. So instead of condition mistakes == 6 you can use remaining_guesses == 0.

Good work!

Wow, thank you so much for giving me feedback! I have never received any before on the forums and this is beyond helpful! I will take all of these into consideration moving forward to become better at writing clean and efficient programs!

I’m actually really ectited for this feedback so thank you once again, 9509706156!