Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell script guess.sh that emulates a simple number guessing game. Your script should: Define a random integer in the range of 1 to

Write a shell script "guess.sh" that emulates a simple number guessing game. Your script should: Define a random integer in the range of 1 to 64 (inclusive) for the user to guess. Display a welcoming message to the user. Prompt the user to guess a number between 1 to 64 (inclusive). Provide a hint to the user each time he/she enters a guess by displaying a message that reads "Too small." or "Too big." accordingly. If a correct guess is entered then display the message "You won!" and exit. Allow the user to guess a maximum of 6 times. After the 6th attempt display a message "You lost!" and exit

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

What are the four basic assumptions underlying GAAP?

Answered: 1 week ago