Computers and Technology
Computers and Technology, 14.12.2019 06:31, vava19

Create a perl script for a number guessing game. here are the requirements:

a. your program generates a random number between 100 and 200 and keeps asking the user to guess the number until the user guesses it correctly.
b. if the user guesses a number that is lower or higher than the number to be guessed then indicate that information to the user as a ‘low guess’ or a ‘high guess’ so that the user can get to the correct guess quicker.
c. the program keeps track on number of guesses taken by the user to get to the correct guess. this is user’s score.
d. use a parameter for number of allowed guesses (set it some value, say 7) and your program congratulates users if user guesses the number correctly in number of guesses less than the number of allowed guesses. the program doesn’t allow user to continue beyond the number of allowed guesses and tells user that the number wasn’t guessed correctly in allowed attempts. you can print the number of allowed guesses at the beginning of the game.
e. write out user name and number of guesses taken to a game report file. each attempt at the game will add a new line to the report file.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, Trumpman137
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
image
Computers and Technology, 22.06.2019 02:00, ayoismeisjuam
The word ‘play’ comes with many different interpretations and a variety of definitions. discuss some of the various meanings tied to the word play. why is the concept of play thought to be an important addition to the workplace? do some (brief) research online and give an example of how play in the workplace is being done right.
Answers: 2
image
Computers and Technology, 22.06.2019 11:30, jcazares3558
Awell-diversified portfolio needs about 20-25 stocks from different categories.
Answers: 2
image
Computers and Technology, 22.06.2019 17:40, math31343
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
Do you know the correct answer?
Create a perl script for a number guessing game. here are the requirements:

a. your pro...

Questions in other subjects:

Konu
Biology, 18.02.2021 03:10
Konu
Chemistry, 18.02.2021 03:10