Hello!
So I made this quick game example for a friend learning python to try give them some reference to look at. It's not a perfect example, but a small example like this can go a long way in helping learn.
I've left some comments along the way through the code, and any PR's for improvement or issues with execution or improvement are more than welcome.
We trust the user to always input a string composed of 4 integers. We only validate that their input length is 4.
We check the number of correct values and inform the user.
The default number of possible tries are 20, but this can be adjusted by modifying the value of numberOfTries
at the top of the file.
You can run the game by executing in the terminal:
python game.py