Page 54 - Touchcode_C6_Flipbook
P. 54
With the help of pseudocode and flowchart, given in example 1, answer the following:
Situation Attend the dance class?
Today is Tuesday and the time is 1.30 PM. Yes
Today is Wednesday and the time is 10.30 AM. No
Today is Wednesday and the time is 3.30 PM. No
Today is Thursday and the time is 5.30 PM. Yes
RELATIONAL OPERATORS
Relational operators compare the values of two operands and return a Boolean result.
Relational operator returns:
1, if the value is true.
0, if the value is false.
Types of relational operators:
Symbol Operator Description (a = 10, b = 20) Example Result
== Equal to a is equal to b. (a == b) False (0)
!= Not equal to a is not equal to b. (a != b) True (1)
> Greater than a is greater than b. (a > b) False (0)
< Less than a is less than b. (a < b) True (1)
a is greater than or equal to
>= Greater than or equal to (a >= b) False (0)
b.
<= Less than or equal to a is less than or equal to b. (a <= b) True (1)
Coding uiz 02
Subject Enrichment
Fill in the blanks.
a. Combine different ............... operators to create a complex expression.
b. ............... operator checks the value of the two operands.
52 Touchcode-VI

