Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago