In this Bite you implement a
Gameclass to perform a number guessing game. It lets a user do a max of 5 guesses of a secret number between 1 and 20 randomly defined by the class.
Note you have to account for invalid inputs: raise a
ValueErrorif a user hits Enter (nothing entered), a non-numeric value, a number that is not in the 1-20 range, or guesses the same number again. See the template code below ... (Advanced Bite, not giving away too much!)
The tests run through a lose scenario as well. Note they mock out the
inputbuiltin to test this. And you will be tested on stdout too so use
Good luck, have fun and keep calm and code in Python!