Question: Create a bash script named lab6s5 that plays a game with the user. When a user executes the script, they must keep guessing the secret

Create a bash script named lab6s5 that plays a game with the user. When a user executes the script, they must keep guessing the secret number until they successfully enter it. Here is an example interaction with the script. Make sure that your script behaves identically:

$ ./lab6s5 I am thinking of a number between 1 and 10. Enter your guess:3 The secret number is larger than your guess. Try again. I am thinking of a number between 1 and 10. Enter your guess:6 The secret number is smaller than your guess. Try again. I am thinking of a number between 1 and 10. Enter your guess:2 The secret number is larger than your guess. Try again. I am thinking of a number between 1 and 10. Enter your guess:5 Yes! 5 is the correct answer!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!