Question: 3. Write a bash script called guess.sh that plays the number guessing game. It is a game where one person thinks of a number between

3. Write a bash script called guess.sh that plays the number guessing game. It is a game where one person thinks of a number between 1 and 100, then the guesser guesses the number. The first person then tells the user if the correct answer is higher or lower than their guess. 1 In our case the person thinking of the number will be a bash script. Below are the rules of the game that you need to take into consideration: a. The script will choose a random number from 1 to 100 and ask the user to guess the number. b. The user enters their guess. C. The script determines if the answer is higher, lower or correct. d. If the correct answer is higher or lower than the guess informs the user (higher or lower) and let them guess again. e. Keep track of the number of guesses. f. If the answer was correct let the user know how many guesses it took to get the correct answer. HINT: Use the bash function SRANDOM to get a random number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
