Deck 5: Making Decisions in a Program

ملء الشاشة (f)
exit full mode
سؤال
A variable that has block scope can be used ____.

A) within the procedure in which it is declared
B) only within the statement block in which it is declared
C) within any statement blocks in the program
D) within any procedures in the program
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
In a dual-alternative selection structure, the word "else" to denote the beginning of the ____ path.

A) true
B) false
C) correct
D) wrong
سؤال
Variables declared within a statement block are referred to as ____ variables.

A) global
B) transient
C) block-level
D) internal
سؤال
String comparisons in Visual Basic are case-sensitive.
سؤال
In Visual Basic, ____ is the not equal to operator.

A) >>
B) >=
C)
D)
سؤال
You do not always need to include the ____ clause in an If ... Then ... Else statement.

A) If
B) Then
C) Else
D) End If
سؤال
You can divide by zero in Visual Basic with no problems.
سؤال
If intQuantity >= 10 Then      dblTotal = intQuantity * 2.5
Else
     dblTotal = intQuantity * 3.5
End If
The intQuantity variable contains the number 8 before the code above is processed. What value will be in the dblTotal variable after the code is processed?

A) 0
B) 20
C) 28
D) 35
سؤال
In a single-alternative selection structure, the tasks to perform when the condition is true are called the ____ path.

A) true
B) right
C) correct
D) specific
سؤال
The set of statements contained in each path of the If...Then...Else statement is referred to as a(n) ____.

A) statement clause
B) operator block
C) statement block
D) comparison clause
سؤال
You use the ____ operator to connect or link together strings.

A) addition
B) concatenation
C) append
D) combination
سؤال
Another term for a selection structure is a ____ structure.

A) sequential
B) decision
C) form
D) repetition
سؤال
Comparison operators are also referred to as ____ operators.

A) syntax
B) Boolean
C) arithmetic
D) relational
سؤال
You use the ____ method to convert a string to lowercase.

A) Lower
B) ConvertLower
C) ParseLower
D) ToLower
سؤال
The diamond in a flowchart is called the decision symbol, because it is used to represent the condition in both the selection and repetition structures.
سؤال
Visual Basic provides the ____ statement for coding single-alternative and dual-alternative selection structures.

A) If...Then...Else
B) Do...Loop
C) Begin..End
D) Select...Case
سؤال
You use the ____ method to convert a string to uppercase.

A) Upper
B) ConvertUpper
C) ParseUpper
D) ToUpper
سؤال
The condition in a selection structure must evaluate to either a True or False answer only.
سؤال
In Visual Basic, ____ is the greater than or equal to operator.

A) >>
B) >=
C)
D)
سؤال
Comparison operators have an order of precedence.
سؤال
What are the similarities and differences between variables declared at the beginning of a procedure and variables declared within a statement block?
سؤال
You create a Random object by declaring it in a(n) ____________________ statement.
سؤال
____________________ operators allow you to combine two or more conditions into one compound condition.
سؤال
What two methods does Visual Basic provide that you can use to solve the case problems that occur when comparing strings?
سؤال
When do you use a selection structure?
سؤال
Explain what happens when you use the OrElse operator.
سؤال
Explain what happens when you use the AndAlso operator.
سؤال
Programmers refer to the process of verifying that the input data is within the expected range as ____.

A) range checking
B) data verification
C) data validation
D) absolute programming
سؤال
Explain logical operators in terms of how they are used and evaluated within an expression. Provide an example of a logical operator.
سؤال
____________________ tables summarize how the computer evaluates the logical operators in an expression.
سؤال
What is a pseudo-random number generator?
سؤال
Describe the purpose of the text box CharacterCasing property.
سؤال
A(n) ______________________________ is a device that produces a sequence of numbers that are sufficiently random for practical purposes.
سؤال
Within a Visual Basic expression, logical operators are evaluated after any arithmetic or ____ operators in an expression.

A) comparison
B) string
C) open
D) closed
سؤال
The Pseudo-random number generator produces a sequence of numbers that are ____.

A) unlimited
B) not completely random
C) infinite
D) completely random
سؤال
How do you connect or link two strings together?
سؤال
Truth tables summarize how the computer evaluates the ____ operators in an expression.

A) integer
B) logical
C) arithmetic
D) string
سؤال
If the intAge variable contains the number 30 , the condition If intAge > 20 AndAlso intAge will evaluate to

A) True
B) False
C) Yes
D) No
سؤال
The ____________________ structure indicates that a decision (based on some condition) needs to be made before any further processing can occur.
سؤال
When you use the ____ operator to combine two sub-conditions, the resulting compound condition evaluates to True only when both sub-conditions are True .

A) And
B) Or
C) AndAlso
D) OrElse
سؤال
Match between columns
Requires a specific set of tasks to be performed only when the condition is true.
condition
Requires a specific set of tasks to be performed only when the condition is true.
<
Requires a specific set of tasks to be performed only when the condition is true.
&
Requires a specific set of tasks to be performed only when the condition is true.
>
Requires a specific set of tasks to be performed only when the condition is true.
OrElse
Requires a specific set of tasks to be performed only when the condition is true.
AndAlso
Requires a specific set of tasks to be performed only when the condition is true.
single-alternative selection structure
Requires a specific set of tasks to be performed only when the condition is true.
dual-alternative selection structure
Requires a specific set of tasks to be performed only when the condition is true.
ControlChars.NewLine constant
Advances the insertion point to the next line in a control.
condition
Advances the insertion point to the next line in a control.
<
Advances the insertion point to the next line in a control.
&
Advances the insertion point to the next line in a control.
>
Advances the insertion point to the next line in a control.
OrElse
Advances the insertion point to the next line in a control.
AndAlso
Advances the insertion point to the next line in a control.
single-alternative selection structure
Advances the insertion point to the next line in a control.
dual-alternative selection structure
Advances the insertion point to the next line in a control.
ControlChars.NewLine constant
The concatenation operator.
condition
The concatenation operator.
<
The concatenation operator.
&
The concatenation operator.
>
The concatenation operator.
OrElse
The concatenation operator.
AndAlso
The concatenation operator.
single-alternative selection structure
The concatenation operator.
dual-alternative selection structure
The concatenation operator.
ControlChars.NewLine constant
The greater than operator.
condition
The greater than operator.
<
The greater than operator.
&
The greater than operator.
>
The greater than operator.
OrElse
The greater than operator.
AndAlso
The greater than operator.
single-alternative selection structure
The greater than operator.
dual-alternative selection structure
The greater than operator.
ControlChars.NewLine constant
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
condition
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
<
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
&
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
>
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
OrElse
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
AndAlso
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
single-alternative selection structure
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
dual-alternative selection structure
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
ControlChars.NewLine constant
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
condition
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
<
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
&
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
>
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
OrElse
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
AndAlso
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
single-alternative selection structure
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
dual-alternative selection structure
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
ControlChars.NewLine constant
Specifies the decision you are making.
condition
Specifies the decision you are making.
<
Specifies the decision you are making.
&
Specifies the decision you are making.
>
Specifies the decision you are making.
OrElse
Specifies the decision you are making.
AndAlso
Specifies the decision you are making.
single-alternative selection structure
Specifies the decision you are making.
dual-alternative selection structure
Specifies the decision you are making.
ControlChars.NewLine constant
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
condition
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
<
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
&
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
>
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
OrElse
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
AndAlso
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
single-alternative selection structure
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
dual-alternative selection structure
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
ControlChars.NewLine constant
سؤال
How do you use the pseudo-random number generator in a procedure?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/42
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Making Decisions in a Program
1
A variable that has block scope can be used ____.

A) within the procedure in which it is declared
B) only within the statement block in which it is declared
C) within any statement blocks in the program
D) within any procedures in the program
B
2
In a dual-alternative selection structure, the word "else" to denote the beginning of the ____ path.

A) true
B) false
C) correct
D) wrong
B
3
Variables declared within a statement block are referred to as ____ variables.

A) global
B) transient
C) block-level
D) internal
C
4
String comparisons in Visual Basic are case-sensitive.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
5
In Visual Basic, ____ is the not equal to operator.

A) >>
B) >=
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
6
You do not always need to include the ____ clause in an If ... Then ... Else statement.

A) If
B) Then
C) Else
D) End If
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
7
You can divide by zero in Visual Basic with no problems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
8
If intQuantity >= 10 Then      dblTotal = intQuantity * 2.5
Else
     dblTotal = intQuantity * 3.5
End If
The intQuantity variable contains the number 8 before the code above is processed. What value will be in the dblTotal variable after the code is processed?

A) 0
B) 20
C) 28
D) 35
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
9
In a single-alternative selection structure, the tasks to perform when the condition is true are called the ____ path.

A) true
B) right
C) correct
D) specific
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
10
The set of statements contained in each path of the If...Then...Else statement is referred to as a(n) ____.

A) statement clause
B) operator block
C) statement block
D) comparison clause
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
11
You use the ____ operator to connect or link together strings.

A) addition
B) concatenation
C) append
D) combination
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
12
Another term for a selection structure is a ____ structure.

A) sequential
B) decision
C) form
D) repetition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
13
Comparison operators are also referred to as ____ operators.

A) syntax
B) Boolean
C) arithmetic
D) relational
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
14
You use the ____ method to convert a string to lowercase.

A) Lower
B) ConvertLower
C) ParseLower
D) ToLower
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
15
The diamond in a flowchart is called the decision symbol, because it is used to represent the condition in both the selection and repetition structures.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
16
Visual Basic provides the ____ statement for coding single-alternative and dual-alternative selection structures.

A) If...Then...Else
B) Do...Loop
C) Begin..End
D) Select...Case
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
17
You use the ____ method to convert a string to uppercase.

A) Upper
B) ConvertUpper
C) ParseUpper
D) ToUpper
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
18
The condition in a selection structure must evaluate to either a True or False answer only.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
19
In Visual Basic, ____ is the greater than or equal to operator.

A) >>
B) >=
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
20
Comparison operators have an order of precedence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
21
What are the similarities and differences between variables declared at the beginning of a procedure and variables declared within a statement block?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
22
You create a Random object by declaring it in a(n) ____________________ statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
23
____________________ operators allow you to combine two or more conditions into one compound condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
24
What two methods does Visual Basic provide that you can use to solve the case problems that occur when comparing strings?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
25
When do you use a selection structure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
26
Explain what happens when you use the OrElse operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
27
Explain what happens when you use the AndAlso operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
28
Programmers refer to the process of verifying that the input data is within the expected range as ____.

A) range checking
B) data verification
C) data validation
D) absolute programming
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
29
Explain logical operators in terms of how they are used and evaluated within an expression. Provide an example of a logical operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
30
____________________ tables summarize how the computer evaluates the logical operators in an expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
31
What is a pseudo-random number generator?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
32
Describe the purpose of the text box CharacterCasing property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
33
A(n) ______________________________ is a device that produces a sequence of numbers that are sufficiently random for practical purposes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
34
Within a Visual Basic expression, logical operators are evaluated after any arithmetic or ____ operators in an expression.

A) comparison
B) string
C) open
D) closed
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
35
The Pseudo-random number generator produces a sequence of numbers that are ____.

A) unlimited
B) not completely random
C) infinite
D) completely random
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
36
How do you connect or link two strings together?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
37
Truth tables summarize how the computer evaluates the ____ operators in an expression.

A) integer
B) logical
C) arithmetic
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
38
If the intAge variable contains the number 30 , the condition If intAge > 20 AndAlso intAge will evaluate to

A) True
B) False
C) Yes
D) No
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
39
The ____________________ structure indicates that a decision (based on some condition) needs to be made before any further processing can occur.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
40
When you use the ____ operator to combine two sub-conditions, the resulting compound condition evaluates to True only when both sub-conditions are True .

A) And
B) Or
C) AndAlso
D) OrElse
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
Requires a specific set of tasks to be performed only when the condition is true.
condition
Requires a specific set of tasks to be performed only when the condition is true.
<
Requires a specific set of tasks to be performed only when the condition is true.
&
Requires a specific set of tasks to be performed only when the condition is true.
>
Requires a specific set of tasks to be performed only when the condition is true.
OrElse
Requires a specific set of tasks to be performed only when the condition is true.
AndAlso
Requires a specific set of tasks to be performed only when the condition is true.
single-alternative selection structure
Requires a specific set of tasks to be performed only when the condition is true.
dual-alternative selection structure
Requires a specific set of tasks to be performed only when the condition is true.
ControlChars.NewLine constant
Advances the insertion point to the next line in a control.
condition
Advances the insertion point to the next line in a control.
<
Advances the insertion point to the next line in a control.
&
Advances the insertion point to the next line in a control.
>
Advances the insertion point to the next line in a control.
OrElse
Advances the insertion point to the next line in a control.
AndAlso
Advances the insertion point to the next line in a control.
single-alternative selection structure
Advances the insertion point to the next line in a control.
dual-alternative selection structure
Advances the insertion point to the next line in a control.
ControlChars.NewLine constant
The concatenation operator.
condition
The concatenation operator.
<
The concatenation operator.
&
The concatenation operator.
>
The concatenation operator.
OrElse
The concatenation operator.
AndAlso
The concatenation operator.
single-alternative selection structure
The concatenation operator.
dual-alternative selection structure
The concatenation operator.
ControlChars.NewLine constant
The greater than operator.
condition
The greater than operator.
<
The greater than operator.
&
The greater than operator.
>
The greater than operator.
OrElse
The greater than operator.
AndAlso
The greater than operator.
single-alternative selection structure
The greater than operator.
dual-alternative selection structure
The greater than operator.
ControlChars.NewLine constant
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
condition
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
<
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
&
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
>
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
OrElse
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
AndAlso
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
single-alternative selection structure
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
dual-alternative selection structure
A logical operator where the compound condition evaluates to False only when both sub-conditions are False .
ControlChars.NewLine constant
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
condition
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
<
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
&
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
>
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
OrElse
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
AndAlso
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
single-alternative selection structure
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
dual-alternative selection structure
Contains two sets of instructions: one set is processed when the condition is true and the other set is processed when the condition is false.
ControlChars.NewLine constant
Specifies the decision you are making.
condition
Specifies the decision you are making.
<
Specifies the decision you are making.
&
Specifies the decision you are making.
>
Specifies the decision you are making.
OrElse
Specifies the decision you are making.
AndAlso
Specifies the decision you are making.
single-alternative selection structure
Specifies the decision you are making.
dual-alternative selection structure
Specifies the decision you are making.
ControlChars.NewLine constant
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
condition
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
<
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
&
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
>
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
OrElse
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
AndAlso
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
single-alternative selection structure
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
dual-alternative selection structure
The logical operator where the compound condition evaluates to True only when both sub-conditions are True .
ControlChars.NewLine constant
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
42
How do you use the pseudo-random number generator in a procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 42 في هذه المجموعة.