Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question
100%
Overview
In this assignment, you will gain more practice with designing a program. Specifically, you will create pseudocode for a higher/lower game. This will
give you practice designing a more complex program and allow you to see more of the benefits that designing before coding can offer. The
higher/lower game will combine different programming constructs that you have been learning about, such as input and output, decision
branching, and a loop.
Higher/Lower Game Description
Your friend Maria has come to you and said that she has been playing the higher/lower game with her three-year-old daughter Bella. María tells
Bella that she is thinking of a number between 1 and 10, and then Bella tries to guess the number. When Bella guesses a number, Maria tells her
whether the number she is thinking of is higher or lower or if Bella guessed it. The game continues until Bella guesses the right number. As much as
Maria likes playing the game with Bella, Bella is very excited to play the game all the time. Maria thought it would be great if you could create a
program that allows Bella to play the game as much as she wants.
Prompt
For this assignment, you will be designing pseudocode for a higher/lower game program. The higher/lower game program uses similar constructs
to the game you will design and develop in Projects One and Two.
1. Review the Higher/Lower Game Sample Output PDF for more detailed examples of this game. As you read, consider the following questions:
• What are the different steps needed in this program? How can you break them down in a way that a computer can understand?
o What information would you need from the user at each point (inputs)? What information would you output to the user at each point?
When might it be a good idea to use "IF" and "IF ELSE" statements?
When might it be a good idea to use loops?
2. Create pseudocode that logically outlines each step of the game program so that it meets the following functionality:
o Prompts the user to input the lower bound and upper bound. Include input validation to ensure that the lower bound is less than the
upper bound.
o Generates a random number between the lower and upper bounds
o Prompts the user to input a guess between the lower and upper bounds. Include input validation to ensure that the user only enters
values between the lower and upper bound.
o Prints an output statement based on the guessed number. Be sure to account for each of the following situations through the use of
decision branching:
What should the computer output if the user guesses a number that is too low?
. What should the computer output if the user guesses a number that is too high?
. What should the computer output if the user guesses the right number?
.
o Loops so that the game continues prompting the user for a new number until the user guesses the correct number.
3. OPTIONAL: If you would like to practice turning your designs into code, check out the optional 9.1 LAB: Higher/Lower Game in zyBooks.
This step is optional, but will give you additional practice turning designs into code, which will support your work in moving from Project One
to Project Two.
Guidelines for Submission
Submit your completed pseudocode as a Word document of approximately 1 to 2 pages in length.
expand button
Transcribed Image Text:Overview In this assignment, you will gain more practice with designing a program. Specifically, you will create pseudocode for a higher/lower game. This will give you practice designing a more complex program and allow you to see more of the benefits that designing before coding can offer. The higher/lower game will combine different programming constructs that you have been learning about, such as input and output, decision branching, and a loop. Higher/Lower Game Description Your friend Maria has come to you and said that she has been playing the higher/lower game with her three-year-old daughter Bella. María tells Bella that she is thinking of a number between 1 and 10, and then Bella tries to guess the number. When Bella guesses a number, Maria tells her whether the number she is thinking of is higher or lower or if Bella guessed it. The game continues until Bella guesses the right number. As much as Maria likes playing the game with Bella, Bella is very excited to play the game all the time. Maria thought it would be great if you could create a program that allows Bella to play the game as much as she wants. Prompt For this assignment, you will be designing pseudocode for a higher/lower game program. The higher/lower game program uses similar constructs to the game you will design and develop in Projects One and Two. 1. Review the Higher/Lower Game Sample Output PDF for more detailed examples of this game. As you read, consider the following questions: • What are the different steps needed in this program? How can you break them down in a way that a computer can understand? o What information would you need from the user at each point (inputs)? What information would you output to the user at each point? When might it be a good idea to use "IF" and "IF ELSE" statements? When might it be a good idea to use loops? 2. Create pseudocode that logically outlines each step of the game program so that it meets the following functionality: o Prompts the user to input the lower bound and upper bound. Include input validation to ensure that the lower bound is less than the upper bound. o Generates a random number between the lower and upper bounds o Prompts the user to input a guess between the lower and upper bounds. Include input validation to ensure that the user only enters values between the lower and upper bound. o Prints an output statement based on the guessed number. Be sure to account for each of the following situations through the use of decision branching: What should the computer output if the user guesses a number that is too low? . What should the computer output if the user guesses a number that is too high? . What should the computer output if the user guesses the right number? . o Loops so that the game continues prompting the user for a new number until the user guesses the correct number. 3. OPTIONAL: If you would like to practice turning your designs into code, check out the optional 9.1 LAB: Higher/Lower Game in zyBooks. This step is optional, but will give you additional practice turning designs into code, which will support your work in moving from Project One to Project Two. Guidelines for Submission Submit your completed pseudocode as a Word document of approximately 1 to 2 pages in length.
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education