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
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
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
Mathematics, 24.12.2019 06:31
question
Mathematics, 24.12.2019 06:31
question
Health, 24.12.2019 06:31
Questions on the website: 13722362