Guessing Game Running Implementation
Example run of the final guessing game program
$ python3 gg.py Welcome to the Ultimate Guessing Game!!! I'm thinking of a number from 1-100.... Try to guess the number! guess #1: 50 Nope...too low guess #2: 75 Nope...too high. guess #3: 57 Nope...too low guess #4: 67 Nope...too high. guess #5: 63 Nope...too low guess #6: 65 Nope...too low guess #7: 66 Correct!! ============================== Number of guesses it took you: 7 Not bad.
And the following run shows some of the error checking implemented in this version.
$ python3 gg.py Welcome to the Ultimate Guessing Game!!! I'm thinking of a number from 1-100.... Try to guess the number! guess #1: zebra Please enter an integer... guess #1: 200 Please guess an integer from 1-100! guess #1: 1 Nope...too low guess #2: 2 Nope...too low guess #3: 3 Nope...too low guess #4: 4 Nope...too low guess #5: 99 Nope...too high. guess #6: 98 Nope...too high. guess #7: -5 Please enter an integer... guess #7: qwerty Please enter an integer... guess #7: 50 Nope...too high. guess #8: 25 Nope...too high. guess #9: 12 Nope...too low guess #10: 16 Nope...too high. guess #11: 14 Nope...too low guess #12: 15 Correct!! ============================== Number of guesses it took you: 12 Better luck next time...