Page 50 - CloudGPT_C8_Flipbook
P. 50
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 go to 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: You can go to play outside, only if you have completed your homework; otherwise,
you should not.
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.
48 Premium Edition-VIII

