Deck 4: Looping

ملء الشاشة (f)
exit full mode
سؤال
A loop control variable's value is tested to control the loop's execution.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
If you use the wrong comparison with the loop control variable, the body of the loop may never execute.
سؤال
You control a loop's repetitions by using either a counter or a(n) ____ value.

A)sentinel
C)end
B)standard
D)constant
سؤال
When the value of a loop control variable is not altered by arithmetic, but is instead altered by user input, this is known as a(n) ____ loop.

A)counted
C)indefinite
B)user-defined
D)definite
سؤال
You can use a while loop to execute a body of statements continuously as long as some condition continues to be false.
سؤال
In all structured loops, the ____ must provide either entry to, or exit from, the repeating structure.

A)loop-controlling statement
C)loop-controlling question
B)loop-directing question
D)loop-ending question
سؤال
Loops are frequently used to validate data.
سؤال
Program logic gets more complicated when you must use loops within loops, or ____ loops.

A)internal
C)stacked
B)grouped
D)nested
سؤال
If a data item is valid, this also means that it is correct.
سؤال
Reprompting for data validation of a user's input is only necessary once.
سؤال
A common mistake when programming with loops is neglecting to ____ the loop control variable.

A)reset
C)end
B)alter
D)output
سؤال
In all structured loops, the loop-controlling question provides the only entry to, or exit from, the repeating structure.
سؤال
The ____ variable is initialized before entering the loop.

A)loop-ending
C)interrupt control
B)ending control
D)loop control
سؤال
The body of a loop can contain only a limited number of statements.
سؤال
A(n) ____ is any numeric variable you use to count the number of times an event has occurred.

A)numerator
C)incremental value
B)counter
D)accumulator
سؤال
The decision that controls every loop is always based on a ____ comparison.

A)Boolean
C)standard
B)logical
D)regular
سؤال
In pseudocode, which statement is used to show the stopping point of a loop structure?

A)stop
C)endif
B)endwhile
D)exitwhile
سؤال
There is no benefit to changing a variable's value when it will never be used again during the current execution.
سؤال
A while loop can be used to code both definite and indefinite loops.
سؤال
When you write a loop, you must control the number of repetitions it performs; if you do not, you run the risk of creating a(n) ____ loop.

A)updating
C)infinite
B)eternal
D)long
سؤال
Loops are frequently used to ____ data; that is, to make sure it is meaningful and useful.

A)include
C)validate
B)declare
D)update
سؤال
The safest and clearest course of action is to assign the value ____ to accumulators before using them.

A)0
C)null
B)1
D)blank
سؤال
One appropriate action when invalid input data has been detected is to assign a(n) ____value and proceed.

A)error
C)decrement
B)random
D)default
سؤال
A(n) ____________________ loop has one entry point and one exit point.
سؤال
A loop for which the number of iterations is ____________________ is called a definite loop, or counted loop.
سؤال
Programmers use the term "____" to describe programs that are well designed, and easy to understand and maintain.

A)refined
C)stylish
B)graceful
D)elegant
سؤال
You usually use the for statement with ____ loops.

A)non-testing
C)definite
B)infinite
D)indefinite
سؤال
At the beginning of any method, it is the programmer's responsibility to ____ all variables that must start with a specific value.

A)internalize
C)clear
B)setup
D)initialize
سؤال
A(n) ____ is a number you use to increase a loop control variable on each pass through a loop.

A)step value
C)increment value
B)control value
D)step variable
سؤال
The value that signals a loop to stop is the ____________________ value.
سؤال
Most languages provide a built-in way to check whether entered data is ____.

A)numeric
C)alphanumeric
B)garbage
D)correct
سؤال
Programmers must be careful to use the correct ____ in the statement that controls a loop.

A)sequence
C)variable
B)comparison
D)identifier
سؤال
If a loop control variable is incremented by user input, it is a(n) ____________________ loop.
سؤال
A(n) ____________________ loop is a loop which has no end.
سؤال
Statements inside a loop that could be placed outside the loop make the loop ____.

A)more efficient
C)incorrect
B)cleaner
D)less efficient
سؤال
What is the correct data type of an accumulator variable used to store real estate sales totals?

A)string
C)text
B)numeric
D)character
سؤال
____ a data item means you override incorrect data by setting the variable to a specific value.

A)Forcing
C)Initializing
B)Incrementing
D)Terminating
سؤال
If you run the same application a second time, the variables might occupy different ____ from the ones they occupied during the first run.

A)virtual storage locations
C)virtual memory locations
B)physical memory locations
D)physical storage locations
سؤال
It is always a mistake to fail to initialize a loop's ____ variable.

A)operational
C)control
B)sequence
D)terminal
سؤال
The difference between an accumulator and a counter lies in the ____ that you add to the variable.

A)comments
C)value
B)updates
D)text
سؤال
____________________ reports show no individual item details.They show only totals.
سؤال
When one loop appears inside another, the loop that contains the other loop is the ____________________ loop.
سؤال
Setting a data item to a specific value to override incorrect input is called ____________________.
سؤال
Good ____________________ programs try to foresee all possible inconsistencies and errors.
سؤال
The amount by which a for loop control variable changes after the body executes is often called a(n) ____________________value.
سؤال
____________________ data can make parts of a program worthless.
سؤال
A(n) ____________________ is a variable used to gather or accumulate values.
سؤال
____________________ a user is a good way to ensure valid data, but it can be frustrating to a user if it continues indefinitely.
سؤال
A(n) ____________________ input is the first input that sets a loop control variable's first value before the loop begins.
سؤال
A(n) ____________________ loop can be used to code for definite and indefinite loops.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 4: Looping
1
A loop control variable's value is tested to control the loop's execution.
True
2
If you use the wrong comparison with the loop control variable, the body of the loop may never execute.
True
3
You control a loop's repetitions by using either a counter or a(n) ____ value.

A)sentinel
C)end
B)standard
D)constant
A
4
When the value of a loop control variable is not altered by arithmetic, but is instead altered by user input, this is known as a(n) ____ loop.

A)counted
C)indefinite
B)user-defined
D)definite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
You can use a while loop to execute a body of statements continuously as long as some condition continues to be false.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
In all structured loops, the ____ must provide either entry to, or exit from, the repeating structure.

A)loop-controlling statement
C)loop-controlling question
B)loop-directing question
D)loop-ending question
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Loops are frequently used to validate data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Program logic gets more complicated when you must use loops within loops, or ____ loops.

A)internal
C)stacked
B)grouped
D)nested
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
If a data item is valid, this also means that it is correct.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
Reprompting for data validation of a user's input is only necessary once.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
A common mistake when programming with loops is neglecting to ____ the loop control variable.

A)reset
C)end
B)alter
D)output
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
In all structured loops, the loop-controlling question provides the only entry to, or exit from, the repeating structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
The ____ variable is initialized before entering the loop.

A)loop-ending
C)interrupt control
B)ending control
D)loop control
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The body of a loop can contain only a limited number of statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
A(n) ____ is any numeric variable you use to count the number of times an event has occurred.

A)numerator
C)incremental value
B)counter
D)accumulator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
The decision that controls every loop is always based on a ____ comparison.

A)Boolean
C)standard
B)logical
D)regular
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
In pseudocode, which statement is used to show the stopping point of a loop structure?

A)stop
C)endif
B)endwhile
D)exitwhile
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
There is no benefit to changing a variable's value when it will never be used again during the current execution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
A while loop can be used to code both definite and indefinite loops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
When you write a loop, you must control the number of repetitions it performs; if you do not, you run the risk of creating a(n) ____ loop.

A)updating
C)infinite
B)eternal
D)long
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Loops are frequently used to ____ data; that is, to make sure it is meaningful and useful.

A)include
C)validate
B)declare
D)update
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
The safest and clearest course of action is to assign the value ____ to accumulators before using them.

A)0
C)null
B)1
D)blank
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
One appropriate action when invalid input data has been detected is to assign a(n) ____value and proceed.

A)error
C)decrement
B)random
D)default
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
A(n) ____________________ loop has one entry point and one exit point.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A loop for which the number of iterations is ____________________ is called a definite loop, or counted loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Programmers use the term "____" to describe programs that are well designed, and easy to understand and maintain.

A)refined
C)stylish
B)graceful
D)elegant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
You usually use the for statement with ____ loops.

A)non-testing
C)definite
B)infinite
D)indefinite
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
At the beginning of any method, it is the programmer's responsibility to ____ all variables that must start with a specific value.

A)internalize
C)clear
B)setup
D)initialize
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n) ____ is a number you use to increase a loop control variable on each pass through a loop.

A)step value
C)increment value
B)control value
D)step variable
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
The value that signals a loop to stop is the ____________________ value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
Most languages provide a built-in way to check whether entered data is ____.

A)numeric
C)alphanumeric
B)garbage
D)correct
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
Programmers must be careful to use the correct ____ in the statement that controls a loop.

A)sequence
C)variable
B)comparison
D)identifier
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
If a loop control variable is incremented by user input, it is a(n) ____________________ loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) ____________________ loop is a loop which has no end.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Statements inside a loop that could be placed outside the loop make the loop ____.

A)more efficient
C)incorrect
B)cleaner
D)less efficient
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
What is the correct data type of an accumulator variable used to store real estate sales totals?

A)string
C)text
B)numeric
D)character
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
____ a data item means you override incorrect data by setting the variable to a specific value.

A)Forcing
C)Initializing
B)Incrementing
D)Terminating
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
If you run the same application a second time, the variables might occupy different ____ from the ones they occupied during the first run.

A)virtual storage locations
C)virtual memory locations
B)physical memory locations
D)physical storage locations
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
It is always a mistake to fail to initialize a loop's ____ variable.

A)operational
C)control
B)sequence
D)terminal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
The difference between an accumulator and a counter lies in the ____ that you add to the variable.

A)comments
C)value
B)updates
D)text
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
____________________ reports show no individual item details.They show only totals.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
When one loop appears inside another, the loop that contains the other loop is the ____________________ loop.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
Setting a data item to a specific value to override incorrect input is called ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Good ____________________ programs try to foresee all possible inconsistencies and errors.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The amount by which a for loop control variable changes after the body executes is often called a(n) ____________________value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
____________________ data can make parts of a program worthless.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
A(n) ____________________ is a variable used to gather or accumulate values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
____________________ a user is a good way to ensure valid data, but it can be frustrating to a user if it continues indefinitely.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
A(n) ____________________ input is the first input that sets a loop control variable's first value before the loop begins.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
A(n) ____________________ loop can be used to code for definite and indefinite loops.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.