Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4: That's My Number! Filename: thatsMyNumber.m The Toots and the Maytals like nothing but to play guessing games. And they want their fans to

image text in transcribed

Problem 4: That's My Number! Filename: thatsMyNumber.m The Toots and the Maytals like nothing but to play guessing games. And they want their fans to be able to do the same. You're the sole engineer at V2 Records, and they've asked you to help. Toots wants to include a number guessing game to celebrate 54-46 That's My Number, and include it, free of charge, shipped with every record a fan buys. So your manager at V2 Records has asked you to help write the game. He has asked you to write an m-file program that executes the classic number guessing game. The computer should randomly select a number between 0 and 100 and store the value in a variable. The computer should then force the variable to be an integer (a number without decimal places). This should be the value to be guessed by the user. There are many ways to force to an integer. Please use Hahn or MATLAB help. The computer should then repeatedly ask the user for their guess. With each guess, the computer should tell the user if the guess is too big, too small, or correct. The script should end when the user has guessed the correct value. Hints: . This problem will need both for loops and conditionals. you will need to use the matlab command: "break. . This problem will need 'input' For simplicity, construct your for loop to repeat 100 times. Some Lyrics For Fun In case you don't know Toots and his crew, some fun words: Second thing they say I must join the office Third thing they say, "Son, give me your number now" He'd say "What's your number?" I don't answer He'd say "What's your number, man?" I don't answer He'd say "What's your number now?", he'd say "What's your number now?" I said "fifty four forty six, that's my number" Fifty four forty six, that's my number, one more time Fifty four forty six, that's my number Fifty four forty six, that's my number

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago