Question: Write a computer game called Hi-Lo. In this game, you will use the random library to generate a number between 1 and 100 and asks
Write a computer game called Hi-Lo. In this game, you will use the random library to generate a number between 1 and 100 and asks the user/player to guess the number. Guesses are counted, and the player is told after each incorrect guess whether the guess is high or low and is asked for another guess. When the player has found the number, he/she is told how many guesses it took.
Requirements
- Use object-oriented design (make a HiLo class)
- After every guess, the program will save the guess in a text file.
- The text file must have the numbers guessed by the user and the number of guesses it took to guess the number.
- Must implement Exception handling
- Must use an interactive menu
Step by Step Solution
3.34 Rating (166 Votes )
There are 3 Steps involved in it
Heres a Python implementation of the HiLo game based on your requirements python import random class ... View full answer
Get step-by-step solutions from verified subject matter experts
