Deck 4: Making Decisions in a Program

ملء الشاشة (f)
exit full mode
سؤال
You use the ____ operator to connect or link together strings.

A) addition
B) concatenation
C) append
D) combination
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
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.
سؤال
Comparison operators have an order of precedence.
سؤال
The condition in a selection structure must evaluate to either a True or False answer only.
سؤال
Comparison operators are also referred to as ____ operators.

A) syntax
B) Boolean
C) arithmetic
D) relational
سؤال
In Visual Basic, ____ is the not equal to operator.

A) >>
B) >=
C) <=
D) <>
سؤال
String comparisons in Visual Basic are case-sensitive.
سؤال
In Visual Basic, ____ is the greater than or equal to operator.

A) >>
B) >=
C) <=
D) <>
سؤال
You use the ____ method to convert a string to uppercase.

A) Upper
B) ConvertUpper
C) ParseUpper
D) ToUpper
سؤال
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
سؤال
You use the ____ method to convert a string to lowercase.

A) Lower
B) ConvertLower
C) ParseLower
D) ToLower
سؤال
The numbers chosen from the Visual Basic pseudo-random number generator are completely random because a definite mathematical algorithm is used to select them.
سؤال
Another term for a selection structure is a ____ structure.

A) sequential
B) decision
C) form
D) repetition
سؤال
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
سؤال
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
سؤال
In a dual-alternative selection structure, the word "else" to denote the beginning of the ____ path.

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

A) If
B) Then
C) Else
D) End If
سؤال
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
سؤال
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
سؤال
Variables declared within a statement block are referred to as ____ variables.

A) global
B) transient
C) block-level
D) internal
سؤال
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
سؤال
If the intAge variable contains the number 30, the condition If intAge > 20 AndAlso intAge < 30 Then will evaluate to

A) True
B) False
C) Yes
D) No
سؤال
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
سؤال
____________________ tables summarize how the computer evaluates the logical operators in an expression.
سؤال
Truth tables summarize how the computer evaluates the ____ operators in an expression.

A) integer
B) logical
C) arithmetic
D) string
سؤال
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
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
A logical operator where the compound condition evaluates to False only when both sub-conditions are False.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The concatenation operator.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
Specifies the decision you are making.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The less than operator.
سؤال
The ____________________ structure indicates that a decision (based on some condition) needs to be made before any further processing can occur.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The greater than operator.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The logical operator where the compound condition evaluates to True only when both sub-conditions are True.
سؤال
A(n) ______________________________ is a device that produces a sequence of numbers that meet certain statistical requirements for randomness.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
Advances the insertion point to the next line in a control.
سؤال
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.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
Requires a specific set of tasks to be performed only when the condition is true.
سؤال
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
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.
سؤال
Pseudo-random numbers are chosen with equal probability from a(n) ____ set of numbers.

A) unlimited
B) finite
C) infinite
D) select
سؤال
What two methods does Visual Basic provide that you can use to solve the case problems that occur when comparing strings?
سؤال
How do you use the pseudo-random number generator in a procedure?
سؤال
When do you use a selection structure?
سؤال
Explain logical operators in terms of how they are used and evaluated within an expression. Provide an example of a logical operator.
سؤال
How do you connect or link two strings together?
سؤال
Explain what happens when you use the AndAlso operator.
سؤال
Describe the purpose of the text box CharacterCasing property.
سؤال
What is a pseudo-random number generator?
سؤال
Explain what happens when you use the OrElse operator.
سؤال
What are the similarities and differences between variables declared at the beginning of a procedure and variables declared within a statement block?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 4: Making Decisions in a Program
1
You use the ____ operator to connect or link together strings.

A) addition
B) concatenation
C) append
D) combination
B
2
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.
True
3
Comparison operators have an order of precedence.
False
4
The condition in a selection structure must evaluate to either a True or False answer only.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Comparison operators are also referred to as ____ operators.

A) syntax
B) Boolean
C) arithmetic
D) relational
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
In Visual Basic, ____ is the not equal to operator.

A) >>
B) >=
C) <=
D) <>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
String comparisons in Visual Basic are case-sensitive.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
In Visual Basic, ____ is the greater than or equal to operator.

A) >>
B) >=
C) <=
D) <>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
You use the ____ method to convert a string to uppercase.

A) Upper
B) ConvertUpper
C) ParseUpper
D) ToUpper
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
You use the ____ method to convert a string to lowercase.

A) Lower
B) ConvertLower
C) ParseLower
D) ToLower
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The numbers chosen from the Visual Basic pseudo-random number generator are completely random because a definite mathematical algorithm is used to select them.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
Another term for a selection structure is a ____ structure.

A) sequential
B) decision
C) form
D) repetition
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
In a dual-alternative selection structure, the word "else" to denote the beginning of the ____ path.

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

A) If
B) Then
C) Else
D) End If
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Variables declared within a statement block are referred to as ____ variables.

A) global
B) transient
C) block-level
D) internal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
If the intAge variable contains the number 30, the condition If intAge > 20 AndAlso intAge < 30 Then will evaluate to

A) True
B) False
C) Yes
D) No
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
____________________ tables summarize how the computer evaluates the logical operators in an expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Truth tables summarize how the computer evaluates the ____ operators in an expression.

A) integer
B) logical
C) arithmetic
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
A logical operator where the compound condition evaluates to False only when both sub-conditions are False.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The concatenation operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
Specifies the decision you are making.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The less than operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
The ____________________ structure indicates that a decision (based on some condition) needs to be made before any further processing can occur.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The greater than operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
The logical operator where the compound condition evaluates to True only when both sub-conditions are True.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
A(n) ______________________________ is a device that produces a sequence of numbers that meet certain statistical requirements for randomness.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
Advances the insertion point to the next line in a control.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
You create a Random object by declaring it in a(n) ____________________ statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
____________________ operators allow you to combine two or more conditions into one compound condition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
Requires a specific set of tasks to be performed only when the condition is true.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Match each item with a statement below.
a.ControlChars.NewLine constant
f.AndAlso
b.condition
g.&
c.>
h.single-alternative selection structure
d.dual-alternative selection structure
i.OrElse
e.<
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
Pseudo-random numbers are chosen with equal probability from a(n) ____ set of numbers.

A) unlimited
B) finite
C) infinite
D) select
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
What two methods does Visual Basic provide that you can use to solve the case problems that occur when comparing strings?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
How do you use the pseudo-random number generator in a procedure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
When do you use a selection structure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Explain logical operators in terms of how they are used and evaluated within an expression. Provide an example of a logical operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
How do you connect or link two strings together?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
Explain what happens when you use the AndAlso operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
Describe the purpose of the text box CharacterCasing property.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
What is a pseudo-random number generator?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
Explain what happens when you use the OrElse operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
What are the similarities and differences between variables declared at the beginning of a procedure and variables declared within a statement block?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.