Page 52 - Touchcode_C6_Flipbook
P. 52
In NOT operator:
If the condition is TRUE, it will return FALSE or No.
If the condition is FALSE, it will return TRUE or Yes.
Critical Thinking
Example 3: You can play outside only of you have completed your
homework; otherwise, you must stay indoors.
Condition: Have you completed your homework?
Decision: Go out to play?
Answer: If you have completed your homework, you can go outside to play.
Otherwise, you must stay indoors and complete your homework first.
Pseudocode:
Program Start
IF NOT (Completed your homework)
THEN
Stay indoors
ELSE
Go out to play
Program End
Possible combinations of the example 3:
Condition Decision
(Have you completed your homework?) (Go out to play?)
Yes No
No Yes
Coding uiz 01
State whether the following statements are true (T) or false (F).
a. Logical operators are used to build a decision-making capability in your code.
b. AND operator is used to check if two or more conditions are false.
Coding fact
Siblings Aditi Prasad and Deepti Rao Suchindran, COO and CIO of Robotix
Learning Solutions have launched the ‘Indian Girls Code’, a free, hands-on
coding and robotics education programme for underprivileged girls.
50 Touchcode-VI

