Deck 4: Decision Structures

ملء الشاشة (f)
exit full mode
سؤال
Which type of structure is used to determine which of two sets of instructions to execute?

A) Decision structure
B) Sequence structure
C) Nested structure
D) Do together structure
E) None of these
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which type of structure is used to execute a set of instructions in the order in which they appear?

A) Decision structure
B) Sequence structure
C) Nested structure
D) Do together structure
E) None of these
سؤال
The expression: either a == b or a != b, or both, is always true.
سؤال
The Else part of the If/Else instruction must have at least one statement.
سؤال
Logical operators are used to compare any two numeric values.
سؤال
The If/Else instruction uses a Boolean condition to determine which set of instructions to execute.
سؤال
Relational operators are used to determine whether a specific
relationship exists between two values.
سؤال
Which type of structure has an If/Else instruction that has an empty Else part?

A) Single-alternative decision structure
B) Dual-alternative decision structure
C) Null decision structure
D) Minimum decision structure
E) None of these
سؤال
What would the penguin say if the following code were executed? If 5 == 4
Penguin say Yes
Else
Penguin say No

A) "Yes"
B) "No"
C) "Yes" then "No"
D) "No" then "Yes"
E) None of these
سؤال
What would the penguin say if the following code were executed? If 5 >= 4
Penguin say Yes
Else
Penguin say No

A) "Yes"
B) "No"
C) "Yes" then "No"
D) "No" then "Yes"
E) None of these
سؤال
What English mathematician are Boolean values named after?

A) Paul Boole
B) George Boole
C) John Boole
D) Ringo Boole
E) None of these
سؤال
The If/Else instruction cannot contain another If/Else instruction.
سؤال
Boolean expressions typically contain relational operators.
سؤال
If a = 6 and b = 6, then the expression a != b is true.
سؤال
Assuming that a = 2 and b = 3, which of the following expressions is true?

A) a > b
B) a < b
C) b <= a
D) a == b
E) None of these
سؤال
What type of operators are used to compare two numeric values?

A) Arithmetic
B) Complex
C) Logical
D) Relational
E) None of these
سؤال
Assuming that a = 1, b = 2, and c = 3, which of the following expressions is true?

A) both a < b and c < b
B) either a > b or b > c, or both
C) both b > a and b < c
D) either a == b or b == c, or both
E) None of these
سؤال
The only way that a nested If/Else instruction will execute is for the
condition of the outer If/Else instruction to be true.
سؤال
The expression: both a == b and a != b, is always false.
سؤال
What type of operators are used to join two Boolean values?

A) Arithmetic
B) Complex
C) Logical
D) Relational
E) None of these
سؤال
The If/Else decision structure uses a ___________________ condition to determine which set of instructions to execute.
سؤال
The ___________________ instruction can be used to test the value of an object's property.
سؤال
When you ___________________ a number, you drop the factional part.
سؤال
___________________ operators are used to compare two numeric values.
سؤال
___________________ operators are used to join two or more Boolean expressions.
سؤال
Assume that a = 1, b = 2, and c = 3.What is the value of the expression: either a < b or b > c, or both? ___________________
سؤال
In the ___________________-alternative decision structure the Else part is empty.
سؤال
What is the value of the expression: a == a? ___________________
سؤال
Assume that a = 1, b = 2, and c = 3.What is the value of the expression: both a < b and b > c? ___________________
سؤال
Assume that a = 3 and b = 2.What is the value of the expression: a < b? ___________________
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/30
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 4: Decision Structures
1
Which type of structure is used to determine which of two sets of instructions to execute?

A) Decision structure
B) Sequence structure
C) Nested structure
D) Do together structure
E) None of these
A
2
Which type of structure is used to execute a set of instructions in the order in which they appear?

A) Decision structure
B) Sequence structure
C) Nested structure
D) Do together structure
E) None of these
B
3
The expression: either a == b or a != b, or both, is always true.
True
4
The Else part of the If/Else instruction must have at least one statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
5
Logical operators are used to compare any two numeric values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
6
The If/Else instruction uses a Boolean condition to determine which set of instructions to execute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
7
Relational operators are used to determine whether a specific
relationship exists between two values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
8
Which type of structure has an If/Else instruction that has an empty Else part?

A) Single-alternative decision structure
B) Dual-alternative decision structure
C) Null decision structure
D) Minimum decision structure
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
9
What would the penguin say if the following code were executed? If 5 == 4
Penguin say Yes
Else
Penguin say No

A) "Yes"
B) "No"
C) "Yes" then "No"
D) "No" then "Yes"
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
10
What would the penguin say if the following code were executed? If 5 >= 4
Penguin say Yes
Else
Penguin say No

A) "Yes"
B) "No"
C) "Yes" then "No"
D) "No" then "Yes"
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
11
What English mathematician are Boolean values named after?

A) Paul Boole
B) George Boole
C) John Boole
D) Ringo Boole
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
12
The If/Else instruction cannot contain another If/Else instruction.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
13
Boolean expressions typically contain relational operators.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
14
If a = 6 and b = 6, then the expression a != b is true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
15
Assuming that a = 2 and b = 3, which of the following expressions is true?

A) a > b
B) a < b
C) b <= a
D) a == b
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
16
What type of operators are used to compare two numeric values?

A) Arithmetic
B) Complex
C) Logical
D) Relational
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
17
Assuming that a = 1, b = 2, and c = 3, which of the following expressions is true?

A) both a < b and c < b
B) either a > b or b > c, or both
C) both b > a and b < c
D) either a == b or b == c, or both
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
18
The only way that a nested If/Else instruction will execute is for the
condition of the outer If/Else instruction to be true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
19
The expression: both a == b and a != b, is always false.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
20
What type of operators are used to join two Boolean values?

A) Arithmetic
B) Complex
C) Logical
D) Relational
E) None of these
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
21
The If/Else decision structure uses a ___________________ condition to determine which set of instructions to execute.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
22
The ___________________ instruction can be used to test the value of an object's property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
23
When you ___________________ a number, you drop the factional part.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
24
___________________ operators are used to compare two numeric values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
25
___________________ operators are used to join two or more Boolean expressions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
26
Assume that a = 1, b = 2, and c = 3.What is the value of the expression: either a < b or b > c, or both? ___________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
27
In the ___________________-alternative decision structure the Else part is empty.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
28
What is the value of the expression: a == a? ___________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
29
Assume that a = 1, b = 2, and c = 3.What is the value of the expression: both a < b and b > c? ___________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
30
Assume that a = 3 and b = 2.What is the value of the expression: a < b? ___________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 30 في هذه المجموعة.