Page 89 - TCS ICT Book 8
P. 89
The City School 2021-2022
to generate the grade in it, edit the label text to Grade not generated yet and also
change the name of this label to lblGrade from the properties panel.
6. Enter the code as shown in the example:
How Does it Work? Developing Applications
• The first condition score >= 90 is evaluated and
if it is true, then the variable grade takes the
value A.
• If a condition is found true, the following
conditions are not evaluated and the
instructions under End If are executed.
• If a condition is evaluated as false, then the
next condition is evaluated and so on, until a
condition is true.
• If none of the conditions are found to be true,
then the code under Else is executed which has
a string value of “Need Improvement”.
4.9. Conditional Operators
Checkpoint
Conditional operators refine the statement you’re Good UI are clear, consistent,
testing for. For instance, you can specify the simple, direct, responsive and
attractive.
statement whether it’s greater than, less than, and a A variable is a name given
whole lot more. to storage area that the
programs can manipulate.
Operator Meaning
= Equal too
> Greater than
< Less than
>= More than or equal to
<= Less than or equal to
<> Not equal to
89

