Deck 4: Dowhile Control Structurecounter-Controlled Loops

ملء الشاشة (f)
exit full mode
سؤال
To create a properly formed DOWHILE loop you must

A)place the loop test before any other step in the loop
B)place the loop steps in the NO path of the loop test
C)indicate that the loop will exit in the YES path of the loop test
D)all of the above
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A counter-controlled loop is more flexible than a loop controlled by a header record value.
سؤال
A program that can be viewed as a single statement is called a

A)structured program
B)proper program
C)header record logic program
D)SIMPLE SEQUENCE program
سؤال
If the value input for START is 8,how many times will the instructions within the loop below be executed?
Read START
COUNT == START
DOWHILE COUNT \leq START
COUNT == COUNT - 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
سؤال
If the value input for START is 8,how many times will the instructions within the loop below be executed?
Read START
COUNT == START
DOWHILE COUNT >> START
COUNT == COUNT - 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
سؤال
Which program flowcharting symbol can be used to represent an initialization step in a program flowchart?

A)decision
B)connector
C)terminal interrupt
D)preparation
سؤال
The test for the No-Data condition is implemented in program design with a(n)

A)IFTHENELSE pattern
B)DOWHILE loop
C)READ statement
D)preparation step
سؤال
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =5 SUM =100 DOWHILE COUNT >5 SUM = SUM +5 COUNT = COUNT +1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 5 \\\text { SUM } = 100 \\\text { DOWHILE COUNT } > 5 \\\quad \text { SUM } = \text { SUM } + 5 \\\quad \text { COUNT } = \text { COUNT } + 1 \\\text { ENDDO } \\\text { ANSWER } = \text { SUM }\end{array}

A)100
B)125
C)5
D)25
سؤال
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
COUNT=2\mathrm { COUNT } = 2
SUM=100\mathrm { SUM } = 100
DOWHILE COUNT <5< 5
SUM=SUM+5\mathrm { SUM } = \mathrm { SUM } + 5
COUNT=COUNT+1\mathrm { COUNT } = \mathrm { COUNT } + 1
ENDDO
ANSWER == SUM

A)110
B)115
C)120
D)125
سؤال
A partial sum cannot have the same value as the corresponding total sum.
سؤال
A variable that is used to hold the sum of a group of values is called a(n)

A)counter
B)accumulator
C)header record
D)loop control
سؤال
How many values will be output when the instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT =0= 0
DOWHILE COUNT <4< 4
ACCUM=ACCUM+ACCUMA C C U M = A C C U M + A C C U M
COUNT == COUNT + 1
Write ACCUM
ENDDO\mathrm { ENDDO }
Write ACCUM

A)4
B)5
C)8
D)16
سؤال
What type of loop is executed a predetermined number of times?

A)infinite
B)counter-controlled
C)header record
D)leading decision
سؤال
A sequence of processing steps that must be repeated is called a

A)decision
B)counter
C)loop
D)proper program
سؤال
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =1 SUM =3 DOWHILE COUNT 0 SUM = SUM + COUNT  COUNT = COUNT 1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 1 \\\text { SUM } = 3 \\\text { DOWHILE COUNT } \geq 0 \\\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
سؤال
A DOWHILE loop is a leading-decision program loop.
سؤال
Any solution algorithm can be expressed using one or more of the three basic control structures.
سؤال
An accumulator always adds or accumulates by a constant amount.
سؤال
If the value input for START is 8,how many times will the instructions within the loop below be executed?
Read START
COUNT == START
DOWHILE COUNT \geq START COUNT == COUNT - 1 Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
سؤال
What is the value of the variable ACCUM after the instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT =0= 0
DOWHILE COUNT4C O U N T \leq 4
ACCUM=ACCUM+ACCUM\mathrm { ACCUM } = \mathrm { ACCUM } + \mathrm { ACCUM }
COUNT=COUNT+1\mathrm { COUNT } = \mathrm { COUNT } + 1
ENDDO

A)8
B)16
C)32
D)64
سؤال
The steps after the loop are always placed on the line after ENDDO and are indented a few positions for clarity.
سؤال
In a counter-controlled loop,the value of the counter must be changed by some statement within the loop..
سؤال
To create a properly formed DOWHILE loop you must place the loop steps in the YES path of the loop.
سؤال
A preparation symbol should be used in a program flowchart to initialize a counter prior to entering a loop.
سؤال
A counter used to control a loop can be either incremented or decremented.
سؤال
A connector symbol must be placed at the exit point of a DOWHILE loop just as it is placed at the exit point of an IFTHENELSE control structure.
سؤال
A READ statement used to input a header record must be placed within the loop that a value in the header record is controlling.
سؤال
To create a properly formed DOWHILE loop you must place the loop test after all other steps within the loop.
سؤال
The loop steps are placed between the DOWHILE statement and the ENDDO statement and are not indented.
سؤال
When header record logic is used in loop processing,the loop is controlled by a counter.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 4: Dowhile Control Structurecounter-Controlled Loops
1
To create a properly formed DOWHILE loop you must

A)place the loop test before any other step in the loop
B)place the loop steps in the NO path of the loop test
C)indicate that the loop will exit in the YES path of the loop test
D)all of the above
A
2
A counter-controlled loop is more flexible than a loop controlled by a header record value.
False
3
A program that can be viewed as a single statement is called a

A)structured program
B)proper program
C)header record logic program
D)SIMPLE SEQUENCE program
B
4
If the value input for START is 8,how many times will the instructions within the loop below be executed?
Read START
COUNT == START
DOWHILE COUNT \leq START
COUNT == COUNT - 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
5
If the value input for START is 8,how many times will the instructions within the loop below be executed?
Read START
COUNT == START
DOWHILE COUNT >> START
COUNT == COUNT - 1
Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which program flowcharting symbol can be used to represent an initialization step in a program flowchart?

A)decision
B)connector
C)terminal interrupt
D)preparation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
7
The test for the No-Data condition is implemented in program design with a(n)

A)IFTHENELSE pattern
B)DOWHILE loop
C)READ statement
D)preparation step
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
8
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =5 SUM =100 DOWHILE COUNT >5 SUM = SUM +5 COUNT = COUNT +1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 5 \\\text { SUM } = 100 \\\text { DOWHILE COUNT } > 5 \\\quad \text { SUM } = \text { SUM } + 5 \\\quad \text { COUNT } = \text { COUNT } + 1 \\\text { ENDDO } \\\text { ANSWER } = \text { SUM }\end{array}

A)100
B)125
C)5
D)25
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
9
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
COUNT=2\mathrm { COUNT } = 2
SUM=100\mathrm { SUM } = 100
DOWHILE COUNT <5< 5
SUM=SUM+5\mathrm { SUM } = \mathrm { SUM } + 5
COUNT=COUNT+1\mathrm { COUNT } = \mathrm { COUNT } + 1
ENDDO
ANSWER == SUM

A)110
B)115
C)120
D)125
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
10
A partial sum cannot have the same value as the corresponding total sum.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
11
A variable that is used to hold the sum of a group of values is called a(n)

A)counter
B)accumulator
C)header record
D)loop control
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
12
How many values will be output when the instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT =0= 0
DOWHILE COUNT <4< 4
ACCUM=ACCUM+ACCUMA C C U M = A C C U M + A C C U M
COUNT == COUNT + 1
Write ACCUM
ENDDO\mathrm { ENDDO }
Write ACCUM

A)4
B)5
C)8
D)16
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
13
What type of loop is executed a predetermined number of times?

A)infinite
B)counter-controlled
C)header record
D)leading decision
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
14
A sequence of processing steps that must be repeated is called a

A)decision
B)counter
C)loop
D)proper program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
15
What is the value of ANSWER after the instructions corresponding to the following pseudocode are executed?
 COUNT =1 SUM =3 DOWHILE COUNT 0 SUM = SUM + COUNT  COUNT = COUNT 1 ENDDO  ANSWER = SUM \begin{array} { l } \text { COUNT } = 1 \\\text { SUM } = 3 \\\text { DOWHILE COUNT } \geq 0 \\\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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
16
A DOWHILE loop is a leading-decision program loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
17
Any solution algorithm can be expressed using one or more of the three basic control structures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
18
An accumulator always adds or accumulates by a constant amount.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
19
If the value input for START is 8,how many times will the instructions within the loop below be executed?
Read START
COUNT == START
DOWHILE COUNT \geq START COUNT == COUNT - 1 Write COUNT
ENDDO

A)0
B)1
C)8
D)infinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
20
What is the value of the variable ACCUM after the instructions corresponding to the following pseudocode are executed?
ACCUM=1\mathrm { ACCUM } = 1
COUNT =0= 0
DOWHILE COUNT4C O U N T \leq 4
ACCUM=ACCUM+ACCUM\mathrm { ACCUM } = \mathrm { ACCUM } + \mathrm { ACCUM }
COUNT=COUNT+1\mathrm { COUNT } = \mathrm { COUNT } + 1
ENDDO

A)8
B)16
C)32
D)64
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
21
The steps after the loop are always placed on the line after ENDDO and are indented a few positions for clarity.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
22
In a counter-controlled loop,the value of the counter must be changed by some statement within the loop..
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
23
To create a properly formed DOWHILE loop you must place the loop steps in the YES path of the loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
24
A preparation symbol should be used in a program flowchart to initialize a counter prior to entering a loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
25
A counter used to control a loop can be either incremented or decremented.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
26
A connector symbol must be placed at the exit point of a DOWHILE loop just as it is placed at the exit point of an IFTHENELSE control structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
27
A READ statement used to input a header record must be placed within the loop that a value in the header record is controlling.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
28
To create a properly formed DOWHILE loop you must place the loop test after all other steps within the loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
29
The loop steps are placed between the DOWHILE statement and the ENDDO statement and are not indented.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
30
When header record logic is used in loop processing,the loop is controlled by a counter.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.