subject
Engineering, 26.11.2019 02:31 brid7931

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.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 12:10
On a average work day more than work place firs are reorted
Answers: 1
question
Engineering, 04.07.2019 18:10
The higher the astm grain-size number, the coarser the grain is. a)-true b)-false
Answers: 3
question
Engineering, 04.07.2019 18:10
The thermal expansion or contraction of a given metal is a function of the f a)-density b)-initial temperature c)- temperature difference d)- linear coefficient of thermal expansion e)- final temperature f)- original length
Answers: 2
You know the right answer?
Create a perl script for a number guessing game. here are the requirements: a. your program generat...
Questions
question
Computers and Technology, 29.01.2020 07:54
question
Health, 29.01.2020 07:54
question
Computers and Technology, 29.01.2020 07:54
question
History, 29.01.2020 07:54
question
Computers and Technology, 29.01.2020 07:54