Deck 8: Dountil Control Structure

Full screen (f)
exit full mode
Question
If condition q is NUM < VALUE,what is condition not q?

A)VALUE < NUM
B)VALUE > NUM
C)NUM = VALUE
D)NUM ≥ VALUE
Use Space or
up arrow
down arrow
to flip the card.
Question
What is the value of the variable ACCUM after instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT =0= 0
DOUNTIL COUNT 4\geq 4
ACCUM=ACCUM+ACCUM\mathrm { ACCUM } = \mathrm { ACCUM } + \mathrm { ACCUM }
COUNT == COUNT + 1
ENDDO

A)8
B)16
C)32
D)64
Question
If the value input for START is 8,how many times will the loop steps in instructions corresponding to the following pseudocode be executed?
Read START
COUNT == START
DOUNTIL COUNT << START COUNT == COUNT - 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
Question
A DOWHILE loop is more flexible than a DOUNTIL loop.
Question
If condition q is NUM ≤ VALUE,what is condition not q?

A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
Question
A DOWHILE loop is composed of a combination of the SIMPLE SEQUENCE control structure and the DOUNTIL control structure.
Question
If the value input for START is 8,how many times will the loop steps in the instructions corresponding to the following pseudocode be executed?
Read START
COUNT == START
DOUNTIL COUNT \geq START COUNT == COUNT - 1 Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
Question
To create a properly formed DOUNTIL loop you must

A)place the loop test after any other step in the loop
B)place the loop steps in the YES path of the loop test
C)indicate that the loop will exit in the NO path of the loop test
D)all of the above
Question
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =1 SUM =3 DOUNTIL COUNT 1 SUM = SUM + COUNT  COUNT = COUNT 1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 1 \\\text { SUM } = 3 \\\text { DOUNTIL COUNT } \leq 1 \\\quad \text { SUM } = \text { SUM } + \text { COUNT } \\\quad \text { COUNT } = \text { COUNT } - 1 \\\text { ENDDO } \\\text { ANSWER } = \text { SUM }\end{array}

A)3
B)4
C)5
D)6
Question
When a DOUNTIL loop is encountered during processing,the steps in the DOUNTIL loop must be executed at least once.
Question
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
COUNT=0\mathrm { COUNT } = 0
SUM=100\mathrm { SUM } = 100
DOUNTIL COUNT 5\geq 5
SUM=SUM+5\mathrm { SUM } = \mathrm { SUM } + 5
COUNT == COUNT + 1
ENDDO
ANSWER =SUM= \mathrm { SUM }

A)5
B)100
C)105
D)125
Question
If the value input for START is 8,how many times will the loop steps in instructions corresponding to the following pseudocode be executed?
Read START
COUNT == START
DOUNTIL COUNT \leq START COUNT == COUNT + 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
Question
In a DOUNTIL loop the priming read is placed at the beginning of the loop steps.
Question
How many values will be output when the instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT=0\mathrm { COUNT } = 0
DOUNTIL COUNT >4> 4
ACCUM=ACCUM+ACCUM\mathrm { ACCUM } = \mathrm { ACCUM } + \mathrm { ACCUM } COUNT == COUNT + 1
Write ACCUM
ENDDO

A)4
B)5
C)8
D)16
Question
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =5 SUM =100 DOUNTIL COUNT <5 SUM = SUM +5 COUNT = COUNT 1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 5 \\\text { SUM } = 100 \\\text { DOUNTIL COUNT } < 5 \\\quad \text { SUM } = \text { SUM } + 5 \\\quad \text { COUNT } = \text { COUNT } - 1 \\\text { ENDDO } \\\text { ANSWER } = \text { SUM }\end{array}

A)5
B)100
C)105
D)125
Question
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
COUNT=2\mathrm { COUNT } = 2
SUM =100= 100
DOUNTIL COUNT >5> 5
SUM=SUM+5\mathrm { SUM } = \mathrm { SUM } + 5
COUNT == COUNT + 1
ENDDO
ANSWER == SUM

A)110
B)115
C)120
D)125
Question
What type of loop is always executed a predetermined number of times?

A)DOWHILE
B)DOUNTIL
C)both a and b
D)neither a nor b
Question
Which of the following is not one of the basic control structures?

A)SIMPLE SEQUENCE
B)IFTHENELSE
C)DOWHILE
D)DOUNTIL
Question
A DOUNTIL loop is a leading-decision program loop.
Question
If condition q is NUM ≠ VALUE,what is condition not q?

A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
Question
To create a properly formed DOUNTIL loop on a program flowchart you must place the loop test after all the steps within the loop.
Question
A DOUNTIL loop cannot be used if automatic end-of-file processing is needed to control the loop.
Question
The steps within a DOUNTIL loop are always placed on the line after DOUNTIL and are indented a few positions for clarity.
Question
In header record logic the DOUNTIL loop is not controlled by a counter as it is with a DOWHILE loop.
Question
To create a properly formed DOUNTIL loop you must place the loop steps in the YES path of the loop.
Question
In a trailing-decision program loop,the test for the loop terminating condition is not made until the other processing steps in the loop have been executed.
Question
A connector symbol must be placed at the entry point of a DOUNTIL loop just as it is placed at the entry point of a DOWHILE loop.
Question
In pseudocode,the DOUNTIL statement is positioned after the loop steps.
Question
The READ statement used to input the header record must be placed before the DOUNTIL loop test.
Question
A DOUNTIL loop is exited when the tested condition is true.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 8: Dountil Control Structure
1
If condition q is NUM < VALUE,what is condition not q?

A)VALUE < NUM
B)VALUE > NUM
C)NUM = VALUE
D)NUM ≥ VALUE
D
2
What is the value of the variable ACCUM after instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT =0= 0
DOUNTIL COUNT 4\geq 4
ACCUM=ACCUM+ACCUM\mathrm { ACCUM } = \mathrm { ACCUM } + \mathrm { ACCUM }
COUNT == COUNT + 1
ENDDO

A)8
B)16
C)32
D)64
16
3
If the value input for START is 8,how many times will the loop steps in instructions corresponding to the following pseudocode be executed?
Read START
COUNT == START
DOUNTIL COUNT << START COUNT == COUNT - 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
1
4
A DOWHILE loop is more flexible than a DOUNTIL loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
5
If condition q is NUM ≤ VALUE,what is condition not q?

A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
6
A DOWHILE loop is composed of a combination of the SIMPLE SEQUENCE control structure and the DOUNTIL control structure.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
7
If the value input for START is 8,how many times will the loop steps in the instructions corresponding to the following pseudocode be executed?
Read START
COUNT == START
DOUNTIL COUNT \geq START COUNT == COUNT - 1 Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
8
To create a properly formed DOUNTIL loop you must

A)place the loop test after any other step in the loop
B)place the loop steps in the YES path of the loop test
C)indicate that the loop will exit in the NO path of the loop test
D)all of the above
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
9
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =1 SUM =3 DOUNTIL COUNT 1 SUM = SUM + COUNT  COUNT = COUNT 1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 1 \\\text { SUM } = 3 \\\text { DOUNTIL COUNT } \leq 1 \\\quad \text { SUM } = \text { SUM } + \text { COUNT } \\\quad \text { COUNT } = \text { COUNT } - 1 \\\text { ENDDO } \\\text { ANSWER } = \text { SUM }\end{array}

A)3
B)4
C)5
D)6
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
10
When a DOUNTIL loop is encountered during processing,the steps in the DOUNTIL loop must be executed at least once.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
11
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
COUNT=0\mathrm { COUNT } = 0
SUM=100\mathrm { SUM } = 100
DOUNTIL COUNT 5\geq 5
SUM=SUM+5\mathrm { SUM } = \mathrm { SUM } + 5
COUNT == COUNT + 1
ENDDO
ANSWER =SUM= \mathrm { SUM }

A)5
B)100
C)105
D)125
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
12
If the value input for START is 8,how many times will the loop steps in instructions corresponding to the following pseudocode be executed?
Read START
COUNT == START
DOUNTIL COUNT \leq START COUNT == COUNT + 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
13
In a DOUNTIL loop the priming read is placed at the beginning of the loop steps.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
14
How many values will be output when the instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT=0\mathrm { COUNT } = 0
DOUNTIL COUNT >4> 4
ACCUM=ACCUM+ACCUM\mathrm { ACCUM } = \mathrm { ACCUM } + \mathrm { ACCUM } COUNT == COUNT + 1
Write ACCUM
ENDDO

A)4
B)5
C)8
D)16
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
15
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =5 SUM =100 DOUNTIL COUNT <5 SUM = SUM +5 COUNT = COUNT 1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 5 \\\text { SUM } = 100 \\\text { DOUNTIL COUNT } < 5 \\\quad \text { SUM } = \text { SUM } + 5 \\\quad \text { COUNT } = \text { COUNT } - 1 \\\text { ENDDO } \\\text { ANSWER } = \text { SUM }\end{array}

A)5
B)100
C)105
D)125
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
16
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
COUNT=2\mathrm { COUNT } = 2
SUM =100= 100
DOUNTIL COUNT >5> 5
SUM=SUM+5\mathrm { SUM } = \mathrm { SUM } + 5
COUNT == COUNT + 1
ENDDO
ANSWER == SUM

A)110
B)115
C)120
D)125
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
17
What type of loop is always executed a predetermined number of times?

A)DOWHILE
B)DOUNTIL
C)both a and b
D)neither a nor b
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following is not one of the basic control structures?

A)SIMPLE SEQUENCE
B)IFTHENELSE
C)DOWHILE
D)DOUNTIL
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
19
A DOUNTIL loop is a leading-decision program loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
20
If condition q is NUM ≠ VALUE,what is condition not q?

A)VALUE > NUM
B)NUM > VALUE
C)VALUE = NUM
D)NUM ≥ VALUE
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
21
To create a properly formed DOUNTIL loop on a program flowchart you must place the loop test after all the steps within the loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
22
A DOUNTIL loop cannot be used if automatic end-of-file processing is needed to control the loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
23
The steps within a DOUNTIL loop are always placed on the line after DOUNTIL and are indented a few positions for clarity.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
24
In header record logic the DOUNTIL loop is not controlled by a counter as it is with a DOWHILE loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
25
To create a properly formed DOUNTIL loop you must place the loop steps in the YES path of the loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
26
In a trailing-decision program loop,the test for the loop terminating condition is not made until the other processing steps in the loop have been executed.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
27
A connector symbol must be placed at the entry point of a DOUNTIL loop just as it is placed at the entry point of a DOWHILE loop.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
28
In pseudocode,the DOUNTIL statement is positioned after the loop steps.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
29
The READ statement used to input the header record must be placed before the DOUNTIL loop test.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
30
A DOUNTIL loop is exited when the tested condition is true.
Unlock Deck
Unlock for access to all 30 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 30 flashcards in this deck.