Lesson 3: Conditional Construct Flashcards
(12 cards)
This is an important part of programming because it can solve practical problems intelligently and provide useful output to the user
Decision Making
are powerful tools that resemble mathematical operators. These operators allow a VB2010 program to compare data values and then decide what actions to take.
Conditional Operators
to execute an event or terminate an event. They are also known as __________.
Numerical Comparison Operators
Sometimes we might need to make more than one comparisons. In this case, using numerical comparison operators alone is not sufficient, we need to use the ______ operators
Logical / Logical Operators
Give examples of logical operators: (4)
- And
- Or
- Xor
- Not
When you use either the ___ operator or the ____operator to combine two subconditions, the resulting compound condition evaluates to True only when both subconditions are True.
And, AndAlso
the ____ operator or the ____ operator, the compound condition evaluates to True when either one or both of the subconditions is True. The compound condition evaluates to False only when both sub conditions are False.
Or, OrElse
We use this to effectively control the Visual Basic Program Flow. We should this control structure together with the conditional operators operators and logical operators.
If Control Structure
What are the three types of If Control Structure?
- If Then
- If Then Else
- If Then Elself
This is the simplest control structure which asks the computer to perform a certain action specified by the Visual Basic 2010 expression if the condition is true. However, when the condition is false, no action will be performed.
If Then Statement
Using only If….Then the statement is not very useful in programming and it does not provide choices for the users. In order to provide a choice, we can use the _______ Statement.
If Then Else
If there are more than two alternative choices, using jus If….Then….Else statement will not be enough. In order to provide more choices, we can use the________ Statement. executed. The syntax for the if…then.. Else statement is
If Then Elself