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
Step: 1
Heres a Python implementation of the HiLo game based on your requirements python import random class ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Java Programming
Authors: Joyce Farrell
10th Edition
0357673425, 9780357673423
Students also viewed these Operating System questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App