**PLEASE USE MATLAB AND DO NOT USE BREAK/CONTINUE COMMANDS** Video games are rather complicated to program, not least ofwhich because of the graphics work that needs to be completed tofinish a video game. Still, even relatively simple games havehistorically had a chance of becoming popular(e.g. Tetris®). Since you are learning to programfor the first time, let’s look at a text-only game. Write a program that has the computer generate a pseudorandominteger between -100 and +100, and ask the user to guess what thenumber is. To generate the pseudorandom number, research and usethe randi command. If the user’s guess is higher than thecomputer-generated pseudorandom number, print a statement to thateffect. If the user’s guess is lower than the computer-generatedpseudorandom number, print a statement to that effect. Keep trackof how many guesses it takes for the user to guess the rightnumber, and print that information to the screen when the programterminates. Do not re-initialize the computer-generatedpseudorandom number between iterations, otherwise the user willhave a hard time trying to guess the computer-generatedpseudorandom number. Validate the user’s input; if the user enters a number greaterthan 100 or less than -100, prompt the user to enter a numberwithin the guess range. Do not count guesses out of range(i.e. greater than 100 or less than -100) as aniteration. Do not concern yourself with testing if the user enterednon-numeric input, and assume that the user will enter an integervalue. If the user enters the value inf, terminate the program(though count that iteration as a valid iteration for the purposesof seeing how many times the program iterated). Use no more than two while loops to solve this problem,and emulate the output format in these two sample runs: Sample Run #1 (with a computer-generated value of 9): Enter your guess: 8
Sorry, your guess was too low. Please try again. Enter your guess: 10
Sorry, your guess was too high. Please try again. Enter your guess: 9 You guessed the correct value! The correct value was 9.
The program iterated 3 times. Sample Run #2 (with a computer-generated value of -3): Enter your guess: 100
Sorry, your guess was too high. Please try again. Enter your guess: -100
Sorry, your guess was too low. Please try again. Enter your guess: inf You asked to terminate the program. The correct value was -3.
The program iterated 3 times. . . .
The main distinction between loanable funds and capital equipment is thata.capital equipment has a measurable productivity, while loanable funds do notb.capital equipment...Dec 12 2019
On March 1, Mr. and Mrs. Trent formed Trent Properties Inc. through which to operate a real estate management business. Both Mr. and Mrs. Trent worked full-time for modes...Apr 01 2020
Suppose a city is hit by a tornado that destroys 25 percent of the housing in the area. Would you expect the total expenditure on housing after the tornado to be greater ...May 15 2020
Vargo Industries has computed its breakeven level of output to be 25,000 units. Based on forecasts from its sales force and past experience, expected unit sales are 32,00...Mar 31 2020
Compute the moment about point A for the linkage shown.Jun 26 2020
what, if any, critical infrastructure is located near your community? How is it protected/maintained? Explain.Jun 04 2020
The nominal price of a 1990 laptop was $3,500 and the CPI that year was 130.7. The nominal price of a laptop in 2010 was $600 and the CPI that year was 218.1. What is th...Apr 13 2021
For the following expression, find the limit. If the limit does not exist, so state, or use the symbol oo or- do where appropriate. 3-6x - 4x2 lim X-5x - 8x-1 3 Select th...Apr 19 2021
Teasdale Inc. manufactures and sells commercial and residential security equipment. The comparative unclassified balance sheets for December 31, Year 2 and Year 1 are pro...May 08 2021
Highlight strengths and weaknesses of the Historical method to calculate VAR. If future returns are not expected to reflect the past, would you use the Historical method? Explain.Apr 27 2021