What is a repetition structure? 2 What is a condition-controlled loop? 3 What is a count-controlled loop? 4 What is a loop iteration? 5 What is the difference between a pretest loop and a posttest loop? 6 Does the While loop test its condition before or after it performs an iteration? 7 Does the Do-While loop test its condition before or after it performs an iteration? 8 What is an infinite loop? 9 What is the difference between a Do-While loop and a Do-Until loop? 10 What is a counter variable? 11 What three actions do count-controlled loops typically perform using the counter variable? 12 When you increment a variable, what are you doing? When you decrement a variable, what are you doing? 13 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer number = 5 Set number = number + 1 Display number 14 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer counter For counter = 1 To 5 Display counter End For 15 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer counter For counter = 0 To 500 Step 100 Display counter End For 16 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer counter = 1 Constant Integer MAX = 8 While counter <= MAX Display counter Set counter = counter + 1 End While 17 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer counter = 1 Constant Integer MAX = 7 While counter <= MAX Display counter Set counter = counter + 2 End While 18 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer counter Constant Integer MIN = 1 For counter = 5 To MIN Step –1 Display counter End For 19 A program that calculates the total of a series of numbers typically has what two elements? 20 What is an accumulator? 21 Should an accumulator be initialized to any specific value? Why or why not? 22 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer number1 = 10, number2 = 5 Set number1 = number1 + number2 Display number1 Display number2 23 Look at the following pseudocode. If it were a real program, what would it display? Declare Integer counter, total = 0 For counter = 1 To 5 Set total = total + counter End For Display total 24 What is a sentinel? 25 Why should you take care to choose a unique value as a sentinel?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

What is a repetition structure?

2 What is a condition-controlled loop?

3 What is a count-controlled loop?

4 What is a loop iteration?

5 What is the difference between a pretest loop and a posttest loop?

6 Does the While loop test its condition before or after it performs an iteration?

7 Does the Do-While loop test its condition before or after it performs an iteration?

8 What is an infinite loop?

9 What is the difference between a Do-While loop and a Do-Until loop?

10 What is a counter variable?

11 What three actions do count-controlled loops typically perform using the counter variable?

12 When you increment a variable, what are you doing? When you decrement a variable, what are you doing?

13 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer number = 5
Set number = number + 1
Display number
14 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer counter
For counter = 1 To 5
Display counter
End For
15 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer counter
For counter = 0 To 500 Step 100
Display counter
End For
16 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer counter = 1
Constant Integer MAX = 8
While counter <= MAX
Display counter
Set counter = counter + 1
End While
17 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer counter = 1
Constant Integer MAX = 7
While counter <= MAX
Display counter
Set counter = counter + 2
End While
18 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer counter
Constant Integer MIN = 1
For counter = 5 To MIN Step –1
Display counter
End For
19 A program that calculates the total of a series of numbers typically has what two elements?

20 What is an accumulator?

21 Should an accumulator be initialized to any specific value? Why or why not?

22 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer number1 = 10, number2 = 5
Set number1 = number1 + number2
Display number1
Display number2
23 Look at the following pseudocode. If it were a real program, what would it display?


Declare Integer counter, total = 0
For counter = 1 To 5
Set total = total + counter
End For
Display total
24 What is a sentinel?

25 Why should you take care to choose a unique value as a sentinel?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Types of Loop
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education