Exercise 2-1 The following exercises are designed to further your understanding of Ruby programming by challenging...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Exercise 2-1 The following exercises are designed to further your understanding of Ruby programming by challenging you to make improvements to the chapter's game project, the Ruby Tall Tale game. 1. As currently designed, the Ruby Tall Tale game collects from the player five pieces of information that are used as input in the creation of the game's story. As a result, there is a limit to how dynamic the story can be. Review the story, and look for opportunities to replace other keywords with user input. To implement this challenge, you will have to add programming logic that prompts the player for additional input and then incor- porates that input into the story's text via embedded variables. 2. As a programmer, it is important to take credit for your hard work. Add a paragraph to the end of the story that provides the player with a little information about the game and its author. Add your URL as well. If you do not have a URL, use your school's URL. To implement this modification, add a fifth paragraph to the end of the story and then add statements to the end of the script that display the paragraph and pause execution to give the player a chance to read it. 3. Add a transitional message between the collection of story input and the telling of the story that lets the player know that input collection is done and that the game is ready to tell the story. To do so, you need to clear the console window and then display the transitional text. porates that input into the story's text via embedded variables. 2. As a programmer, it is important to take credit for your hard work. Add a paragraph to the end of the story that provides the player with a little information about the game and its author. Add your URL as well. If you do not have a URL, use your school's URL. To implementis modification, add a fifth paragraph to the end of the story and then add statements to the end of the script that display the paragraph and pause execution to give the player a chance to read it. 3. Add a transitional message between the collection of story input and the telling of the story that lets the player know that input collection is done and that the game is ready to tell the story. To do so, you need to clear the console window and then display the transitional text. 4. Modify the program so that the message that's displayed when the player elects not to play the game is also displayed at the end of the story. To do so, insert additional text messages using puts statements just before the else keyword in the Main Script Logic section. 5. As currently written, the game prompts the player to enter n to quit and y to play. If n is entered, the game halts. However, if anything else is entered, or if the Enter key is pressed with nothing entered, the game resumes. Change the game so that it can only be played when the player enters y. Do this by replacing the first set of script statements that follows with the second set of script statements that follows. Exercise 2-1 The following exercises are designed to further your understanding of Ruby programming by challenging you to make improvements to the chapter's game project, the Ruby Tall Tale game. 1. As currently designed, the Ruby Tall Tale game collects from the player five pieces of information that are used as input in the creation of the game's story. As a result, there is a limit to how dynamic the story can be. Review the story, and look for opportunities to replace other keywords with user input. To implement this challenge, you will have to add programming logic that prompts the player for additional input and then incor- porates that input into the story's text via embedded variables. 2. As a programmer, it is important to take credit for your hard work. Add a paragraph to the end of the story that provides the player with a little information about the game and its author. Add your URL as well. If you do not have a URL, use your school's URL. To implement this modification, add a fifth paragraph to the end of the story and then add statements to the end of the script that display the paragraph and pause execution to give the player a chance to read it. 3. Add a transitional message between the collection of story input and the telling of the story that lets the player know that input collection is done and that the game is ready to tell the story. To do so, you need to clear the console window and then display the transitional text. porates that input into the story's text via embedded variables. 2. As a programmer, it is important to take credit for your hard work. Add a paragraph to the end of the story that provides the player with a little information about the game and its author. Add your URL as well. If you do not have a URL, use your school's URL. To implementis modification, add a fifth paragraph to the end of the story and then add statements to the end of the script that display the paragraph and pause execution to give the player a chance to read it. 3. Add a transitional message between the collection of story input and the telling of the story that lets the player know that input collection is done and that the game is ready to tell the story. To do so, you need to clear the console window and then display the transitional text. 4. Modify the program so that the message that's displayed when the player elects not to play the game is also displayed at the end of the story. To do so, insert additional text messages using puts statements just before the else keyword in the Main Script Logic section. 5. As currently written, the game prompts the player to enter n to quit and y to play. If n is entered, the game halts. However, if anything else is entered, or if the Enter key is pressed with nothing entered, the game resumes. Change the game so that it can only be played when the player enters y. Do this by replacing the first set of script statements that follows with the second set of script statements that follows.
Expert Answer:
Answer rating: 100% (QA)
the task is to improve the Ruby Tall Tale game by making certain modifications Here are the tasks th... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The following exercises are designed to help solidify your understanding of inverse, exponential, and logarithmic functions from Sections. Determine whether the functions in each pair are inverses of...
-
The following exercises are designed to help solidify your understanding of inverse, exponential, and logarithmic functions from Sections. Determine whether the functions in each pair are inverses of...
-
The following exercises are designed to help solidify your understanding of inverse, exponential, and logarithmic functions from Sections. Determine whether the functions in each pair are inverses of...
-
What has been the trend in sales over the years presented? July 29, July 30, 2023 2022 (Unaudited) (Unaudited) Net sales $ 5,164,072 100.0% $ 4,643,014 100.0% Cost of sales 3,115,603 60.3% 2,773,824...
-
What is the impact of the smoothing constant value on the simple exponential smoothing forecast?
-
What are the steps in preparing a bank reconciliation?
-
McCaw Cellular Communications reported earnings before interest and taxes of \($850\) million in 1993, with a depreciation allowance of \($400\) million and capital expenditures of \($550\) million...
-
The management of Kunkel Company is considering the purchase of a $40,000 machine that would reduce operating costs by $7,000 per year. At the end of the machines eight-year useful life, it will have...
-
A coupon bond that pays interest semi-annually is selling at par value of $1,000, matures in 7 years, and has a coupon rate of 9%. The yield to maturity on this bond is:
-
At a local university, the Student Commission on Programming and Entertainment (SCOPE) is preparing to host its first rock concert of the school year. To successfully produce this rock concert, SCOPE...
-
What is the difference between providing a guest with information and actually communicating with that guest? Give an example of each. How can hospitality organizations know if information has been...
-
Why is it important that audit populations be defined properly?
-
Fill in the Blank. The method of decomposing a symmetric positive definite matrix \([A]\) as \([A]=[U]^{T}[U]\) is known as ___________ method.
-
When is sequential sampling appropriate?
-
Fill in the Blank. Each step of Jacobi's method reduces a pair of off-diagonal elements to ___________ .
-
Fill in the Blank. The ___________ theorem permits the representation of any vector as a linear combination of the eigenvectors of the system.
-
Who are you? How would you describe yourself? How does who you are affect your behavior? Think of a situation where your personality influenced your behavior. Tell me about that situation and your...
-
Provide a draft/outline of legal research involving an indigenous Canadian woman charged with assault causing bodily harm under (Sec 267b) of the Criminal Code, where the crown wants a 12-month jail...
-
To help familiarize you with the financial reporting of a real company in order to further your understanding of the chapter material you are learning. Although we do not have access to the journals...
-
On April 1, Miracle Applications paid $1,500,000 to acquire a patent on software. Miracle Applications expects the patent to have a useful life of 4 years. Requirements 1. Journalize the entry to...
-
Journalize the adjusting entry needed at March 31, the fiscal year-end, for each of the following independent situations. No other adjusting entries have been made for the year. a. On February 1, we...
-
Distinguish between the levels of materiality and per vasiveness an auditor considers when assessing how to deal with a non-GAAP condition in the financial statements.
-
At times, for a variety of reasons, an auditor must rely on another firm of auditors to perform part of an audit. What reference does the primary auditor make to the secondary auditor in the...
-
How does an auditor's opinion differ between scope limitations caused by client restrictions and limitations resulting from conditions beyond the client's control? What is the effect of each on the...
Study smarter with the SolutionInn App