Deck 9: Time to Leave the Nest Nested Selection Structures

ملء الشاشة (f)
exit full mode
سؤال
You use the selection structure to make a decision and then select the appropriate path-either the true path or the false path-based on the result.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
In a nested structure, the instructions in both the true and false paths should be ____ within the outer selection structure.

A) assigned
C) collected
B) bracketed
D) indented
سؤال
A(n) ____ selection structure is contained within the outer selection structure.

A) nested
C) coated
B) indented
D) shell
سؤال
The instructions in the true path of a nested structure should not be indented within the inner selection structure.
سؤال
Logical operators, sometimes referred to as ____ operators, allow you to combine two or more conditions into one compound condition.

A) truth
C) Boolean
B) compound
D) syntactic
سؤال
With the ____ operator, all conditions must be True for the compound condition to be True.

A) AndAlso
C) AndElse
B) OrAlso
D) OrElse
سؤال
The OrElse operator has a precedence number of 9.
سؤال
Expressions containing logical operators always evaluate to a(n) ____ value.

A) Boolean
C) string
B) conditional
D) compound
سؤال
The AndAlso operator has a precedence number of 2.
سؤال
When either a selection structure's true path or its false path contains another selection structure, the inner selection structure is referred to as a(n) ____ structure.

A) indented
C) nested selection
B) nested
D) indented selection
سؤال
When comparing two numbers, keep in mind that the first number can be greater than, less than, or equal to the second number.
سؤال
Only one path in a selection structure can include instructions that declare variables, perform calculations, and so on.
سؤال
When only one decision needs to be made, it does not require a nested selection structure.
سؤال
You cannot use a nested selection structure when more than one decision must be made before the appropriate action can be taken.
سؤال
With the ____ operator, only one of the conditions needs to be True for the compound condition to be True.

A) AndAlso
C) AndElse
B) OrAlso
D) OrElse
سؤال
You use a ____ selection structure when more than one decision must be made before the appropriate action can be taken.

A) shell
C) logical
B) nested
D) split
سؤال
Only one path in a selection structure can include other selection structures.
سؤال
When swapping values there is no need to swap when the two numbers are equal.
سؤال
Logical operators are always evaluated before any comparison operators in an expression.
سؤال
Like expressions containing comparison operators, expressions containing logical operators always evaluate to a Boolean value.
سؤال
If an expression contains logical operators, comparison operators, and arithmetic operators, ____.

A) the comparison operators are evaluated last
B) the arithmetic operators are evaluated last
C) the logical operators are evaluated last
D) the operators are evaluated in order
سؤال
When the computer processes the expression 12 > 0 AndAlso 12 < 10 * 2, it evaluates the ____ operator last.

A) *
C) >
B) <
D) AndAlso
سؤال
When the computer processes the expression 12 > 0 AndAlso 12 < 10 * 2, it evaluates the ____ operator first.

A) *
C) >
B) <
D) AndAlso
سؤال
If an expression contains logical operators, comparison operators, and arithmetic operators, ____.

A) the comparison operators are evaluated first
B) the arithmetic operators are evaluated first
C) the logical operators are evaluated first
D) the operators are evaluated in order
سؤال
The pseudocode "if the hours worked are greater than or equal to 0 but less than or equal to 40" is coded as ____ in Visual Basic.

A) If decHours > 0 AndAlso decHours < 40
B) If decHours => 0 AndAlso decHours =< 40
C) If decHours >= 0 AndAlso decHours <= 40
D) If decHours >= 40 AndAlso decHours <= 0
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/25
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 9: Time to Leave the Nest Nested Selection Structures
1
You use the selection structure to make a decision and then select the appropriate path-either the true path or the false path-based on the result.
True
2
In a nested structure, the instructions in both the true and false paths should be ____ within the outer selection structure.

A) assigned
C) collected
B) bracketed
D) indented
D
3
A(n) ____ selection structure is contained within the outer selection structure.

A) nested
C) coated
B) indented
D) shell
A
4
The instructions in the true path of a nested structure should not be indented within the inner selection structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
5
Logical operators, sometimes referred to as ____ operators, allow you to combine two or more conditions into one compound condition.

A) truth
C) Boolean
B) compound
D) syntactic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
6
With the ____ operator, all conditions must be True for the compound condition to be True.

A) AndAlso
C) AndElse
B) OrAlso
D) OrElse
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
7
The OrElse operator has a precedence number of 9.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
8
Expressions containing logical operators always evaluate to a(n) ____ value.

A) Boolean
C) string
B) conditional
D) compound
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
9
The AndAlso operator has a precedence number of 2.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
10
When either a selection structure's true path or its false path contains another selection structure, the inner selection structure is referred to as a(n) ____ structure.

A) indented
C) nested selection
B) nested
D) indented selection
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
11
When comparing two numbers, keep in mind that the first number can be greater than, less than, or equal to the second number.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
12
Only one path in a selection structure can include instructions that declare variables, perform calculations, and so on.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
13
When only one decision needs to be made, it does not require a nested selection structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
14
You cannot use a nested selection structure when more than one decision must be made before the appropriate action can be taken.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
15
With the ____ operator, only one of the conditions needs to be True for the compound condition to be True.

A) AndAlso
C) AndElse
B) OrAlso
D) OrElse
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
16
You use a ____ selection structure when more than one decision must be made before the appropriate action can be taken.

A) shell
C) logical
B) nested
D) split
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
17
Only one path in a selection structure can include other selection structures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
18
When swapping values there is no need to swap when the two numbers are equal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
19
Logical operators are always evaluated before any comparison operators in an expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
20
Like expressions containing comparison operators, expressions containing logical operators always evaluate to a Boolean value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
21
If an expression contains logical operators, comparison operators, and arithmetic operators, ____.

A) the comparison operators are evaluated last
B) the arithmetic operators are evaluated last
C) the logical operators are evaluated last
D) the operators are evaluated in order
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
22
When the computer processes the expression 12 > 0 AndAlso 12 < 10 * 2, it evaluates the ____ operator last.

A) *
C) >
B) <
D) AndAlso
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
23
When the computer processes the expression 12 > 0 AndAlso 12 < 10 * 2, it evaluates the ____ operator first.

A) *
C) >
B) <
D) AndAlso
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
24
If an expression contains logical operators, comparison operators, and arithmetic operators, ____.

A) the comparison operators are evaluated first
B) the arithmetic operators are evaluated first
C) the logical operators are evaluated first
D) the operators are evaluated in order
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
25
The pseudocode "if the hours worked are greater than or equal to 0 but less than or equal to 40" is coded as ____ in Visual Basic.

A) If decHours > 0 AndAlso decHours < 40
B) If decHours => 0 AndAlso decHours =< 40
C) If decHours >= 0 AndAlso decHours <= 40
D) If decHours >= 40 AndAlso decHours <= 0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.