EBK STARTING OUT WITH PROGRAMMING LOGIC
4th Edition
ISBN: 9780100659384
Author: GADDIS
Publisher: YUZU
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 5.3, Problem 5.16CP
Look at the following pseudocode. If it were a real program, what would it display?
Declare Integer counter =
Constant Integer MAX = 8
While counter <= MAX
Display counter
Set counter = counter + 1
End While
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Text Book: Starting Out with Programing Logic & Design 5 edition
Write a program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate.
Step 1: Examine the following algorithm. (Reference: Designing a Program, page 31).
Get the student name.
Get the degree program name.
Subtract the number of credits taken so far from the required credits for the degree.
Get the number of credits required for the degree program.
Get the number of credits the student has taken so far.
Display the input information in Step 1 and 2.
Display the calculated information.
Step 2: What logic error do you spot and how would you fix it?
Step 3: What steps require user interaction (Ex: user must type in some…
Text Book: Starting Out with Programing Logic & Design 5 edition
Write a program that will take in basic information from a student, including student name, degree name, number of credits taken so far, and the total number of credits required in the degree program. The program will then calculate how many credits are needed to graduate. Display should include the student name, the degree name, and credits left to graduate.
Step 1: Examine the following algorithm. (Reference: Designing a Program, page 31).
Get the student name.
Get the degree program name.
Subtract the number of credits taken so far from the required credits for the degree.
Get the number of credits required for the degree program.
Get the number of credits the student has taken so far.
Display the input information in Step 1 and 2.
Display the calculated information.
Step 3: What steps require user interaction (Ex: user must type in some input)?
Looping for Statements
Write a program that will display a multiplication table with the format
shown below. The range of the table
2
10
10
20
30
100
X123
1123
X
3
10
2246
3369
2
4
10 20 30
Chapter 5 Solutions
EBK STARTING OUT WITH PROGRAMMING LOGIC
Ch. 5.1 - What is a repetition structure?Ch. 5.1 - What is a condition-controlled loop?Ch. 5.1 - What is a count-controlled loop?Ch. 5.2 - What is a loop iteration?Ch. 5.2 - What is the difference between a pretest loop and...Ch. 5.2 - Does the While loop test its condition before or...Ch. 5.2 - Does the Do-While loop test its condition before...Ch. 5.2 - What is an infinite loop?Ch. 5.2 - What is the difference between a Do-While loop and...Ch. 5.3 - What is a counter variable?
Ch. 5.3 - What three actions do count-controlled loops...Ch. 5.3 - When you increment a variable, what are you doing?...Ch. 5.3 - Look at the following pseudocode. If it were a...Ch. 5.3 - Prob. 5.14CPCh. 5.3 - Look at the following pseudocode. If it were a...Ch. 5.3 - Look at the following pseudocode. If it were a...Ch. 5.3 - Look at the following pseudocode. If it were a...Ch. 5.3 - Look at the following pseudocode. If it were a...Ch. 5.4 - A program that calculates the total of a series of...Ch. 5.4 - Prob. 5.20CPCh. 5.4 - Should an accumulator be initialized to any...Ch. 5.4 - Look at the following pseudocode. If it were a...Ch. 5.4 - Look at the following pseudocode. If it were a...Ch. 5.5 - Prob. 5.24CPCh. 5.5 - Why should you take care to choose a unique value...Ch. 5 - A ______ controlled loop uses a true/false...Ch. 5 - A ______ controlled loop repeats a specific number...Ch. 5 - Each repetition of a loop is known as a(n) ______....Ch. 5 - The Whi1e loop is a ______ type of loop. a....Ch. 5 - The Do-Whi1e loop is a ______ type of loop. a....Ch. 5 - The For loop is a ______ type of loop. a. pretest...Ch. 5 - A(n) ______ loop has no way of ending and repeats...Ch. 5 - A _______ loop always executes at least once. a....Ch. 5 - Prob. 9MCCh. 5 - A(n) ______ is a special value that signals when...Ch. 5 - A condition-controlled loop always repeats a...Ch. 5 - The While loop is a pretest loop.Ch. 5 - The Do-While loop is a pretest loop.Ch. 5 - You should not write code that modifies the...Ch. 5 - You cannot display the contents of the counter...Ch. 5 - Prob. 6TFCh. 5 - The following statement decrements the variable x:...Ch. 5 - It is not necessary to initialize accumulator...Ch. 5 - In a nested loop, the inner loop goes through all...Ch. 5 - To calculate the total number of iterations of a...Ch. 5 - Why should you indent the statements in the body...Ch. 5 - Describe the difference between pretest loops and...Ch. 5 - What is a condition-controlled loop?Ch. 5 - What is a count-controlled loop?Ch. 5 - What three actions do count-controlled loops...Ch. 5 - What is an infinite loop? Write the code for an...Ch. 5 - A For loop looks like what other loop in a...Ch. 5 - Why is it critical that accumulator variables are...Ch. 5 - What is the advantage of using a sentinel?Ch. 5 - Prob. 10SACh. 5 - Design a Whi1e loop that lets the user enter a...Ch. 5 - Design a Do-Whi1e loop that asks the user to enter...Ch. 5 - Design a For loop that displays the following set...Ch. 5 - Design a loop that asks the user to enter a...Ch. 5 - Design a For loop that calculates the total of the...Ch. 5 - Design a nested loop that displays 10 rows of #...Ch. 5 - Convert the Whi1e loop in the following code to a...Ch. 5 - Convert the Do-Whi1e loop in the following code to...Ch. 5 - Convert the following Whi1e loop to a For loop:...Ch. 5 - Convert the following For loop to a Whi1e loop:...Ch. 5 - Find the error in the following pseudocode....Ch. 5 - The programmer intended the following pseudocode...Ch. 5 - The programmer intended the following pseudocode...Ch. 5 - Bug Collector A bug collector collects bugs every...Ch. 5 - Calories Burned Running on a particular treadmill...Ch. 5 - Budget Analysis Design a program that asks the...Ch. 5 - Sum of Numbers Design a program with a loop that...Ch. 5 - Tuition Increase At one college, the tuition for a...Ch. 5 - Distance Traveled The distance a vehicle travels...Ch. 5 - Average Rainfall Design a program that uses nested...Ch. 5 - Celsius to Fahrenheit Table Design a program that...Ch. 5 - Pennies for Pay Design a program that calculates...Ch. 5 - Largest and Smallest Design a program with a loop...Ch. 5 - First and Last Design a program that asks the user...Ch. 5 - Calculating the Factorial of a Number In...Ch. 5 - Prob. 13PE
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
The ________ object is assumed to exist and it is not necessary to include it as an object when referring to it...
Web Development and Design Foundations with HTML5 (8th Edition)
Define the three types of recursive binary relationships, and give an example of each, other than the ones show...
Database Concepts (8th Edition)
Consider the adage Never ask a question for which you do not want the answer. a. Is following that adage ethica...
Experiencing MIS
What are hardware and software?
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
In Exercises 33 through 40, determine the output displayed in the list box by the lines of code.
Introduction To Programming Using Visual Basic (11th Edition)
You can use this class to display dialog boxes. a. JOptionPane b. BufferedReader c. InputStreamReader d. Dialog...
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Knowledge Booster
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
- Instruction: Create a notation resembling a simplified programming language with the input and output of a counting problem. Write a program with the specified input and output: Create a program for geometric sequence (initial value and common ratio)arrow_forwardWhat are the three parts of a for loop control? Write a for loop that prints the number from 1 to 100. (java)arrow_forwardFYI: Please write the code in Pseudocode (no programming language please) 1. Write pseudocode module that loops through random numbers until it generates the "lucky number". In the main(), ask the user to enter a lucky number between 1 to 10 Validate the user’s input Pass the lucky number to the module from the main() In the module, display each number that gets randomly generated. A number in the range of 1-10 Return a count of the number of times it took to get the “luck number” Write the entire program including the Main()arrow_forward
- 1.) Using Python programming language, create a SERIES CIRCUIT program. Input: 1 voltage source Number of resistors Value of each resistor Output: Display total current and display each voltage of each resistor. Example: Voltage value (V): 12 Number of resistors: 2 Resistor 1 value (ohm): 6 Resistor 2 value (ohm): 4 Total current is 1.2 A Resistor 1 voltage is 7.2 V Resistor 2 voltage is 4.8 V 2.) Using Python programming language, create a PARALLEL CIRCUIT program. Input: 1 voltage source Number of resistors Value of each resistor Output: Display total current and display each current of each resistor. Example: Voltage value (V): 12 Number of resistors: 2 Resistor 1 value (ohm): 5 Resistor 2 value (ohm): 8 Total current is 3.9 A Resistor 1 current is 2.4 A…arrow_forwardWrite a pseudocode that will ask a number from the user and will display its factors.arrow_forwardWrite pseudocode with variables!! Write all declare variables first then initiate pseudocodearrow_forward
- Last line of code must be: Systen.out.println(result); No loops,if else statements, Intro level Java Classarrow_forwardPower of two Python Language please Programming challenge description: Write a program, given a positive integer, determines if the number is an exact power of two. Input: Your program should read lines from standard input. Each line contains a positive integer. Output: For each line of input, print to standard output 'true' if the number is an exact power of two and 'false' if not. Print out each result on a new line. Test 1 Test InputDownload Test 1 Input 16 Expected OutputDownload Test 1 Output true Test 2 Test InputDownload Test 2 Input 1024 Expected OutputDownload Test 2 Output truearrow_forwardPython code BASIC CALCULATOR Input: Single string of two numbers and an operation Output: The calculator should be able to do addition, subtraction, multiplication, division, modulus and exponential Example: Input an equation: 1+1 The sum is 2arrow_forward
- Write pseudocode with variables and comments!! Write all declare variables first then initiate pseudocodearrow_forwardWhat is the difference between pseudocode and flowcharts?arrow_forwardComputer Science MASM Assembly 8086 Write an program that will get the name and 1 number from a person. the output will double the number they have. you will get number and name twice finally display the largest number with the name example: Please enter your name: TONY Please enter your grade: 15 Tony, you got a 30 Please enter your name: April Please enter your grade: 10 April, you got a 20 Finally display, Tony you got a 30arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Structured Chart; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=vdUO-sGA1DA;License: Standard YouTube License, CC-BY
Introduction to Structure Charts; Author: Christopher Kalodikis;https://www.youtube.com/watch?v=QN2bjNplGlQ;License: Standard Youtube License