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 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Different types of steels contain different elements that alter the characteristics of the steel. for each of the following elements, explain what the element does when alloyed with steel.
Answers: 2
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
question
Engineering, 04.07.2019 18:10
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
You know the right answer?
Create a perl script for a number guessing game. here are the requirements: a. your program generat...
Questions
question
Physics, 29.01.2021 05:30
question
English, 29.01.2021 05:30
question
Biology, 29.01.2021 05:30
question
Business, 29.01.2021 05:30
question
English, 29.01.2021 05:30
question
Chemistry, 29.01.2021 05:30
question
Mathematics, 29.01.2021 05:30
Questions on the website: 13722359