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?

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter5: Looping
Section: Chapter Questions
Problem 3RQ
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning