Page 65 - CloudGPT_C7_Flipbook
P. 65

D.  Match the following:
                     1.  TRUE                                   a.  0

                     2.  FALSE                                  b.   a is less than b

                     3.  a<b                                    c.  1
                     4.  a>=b                                   d.  OR

                     5.  ||                                     e.  a is greater than or equal to b

                 E.  Answer the following questions:

                     1.  What are logical operators?

                         ..............................................................................................................................................................
                         ..............................................................................................................................................................

                     2.  Explain AND logical operator.
                         ..............................................................................................................................................................

                         ..............................................................................................................................................................
                     3.  Explain by giving an example on how to combine different logical operators.

                         ..............................................................................................................................................................
                         ..............................................................................................................................................................

                     4.  Explain OR logical operator.
                         ..............................................................................................................................................................

                         ..............................................................................................................................................................
                     5.  Write one difference between AND and NOT logical operator.

                         ..............................................................................................................................................................
                         ..............................................................................................................................................................

                     6.  Explain any two relational operators.

                         ..............................................................................................................................................................
                         ..............................................................................................................................................................


                                                                                                   Experiential Learning
                       Applied Project


                       To create an if-else block with a NOT condition and set two different background
                                                      colors on the controller

                  To perform the task, follow these steps:
                  Step 1:   Open MakeCode and create a new project and name your project.



                                                                                     Control with Conditionals   63
   60   61   62   63   64   65   66   67   68   69   70