Page 62 - Touchcode_C5_Flipbook
P. 62

MULTIPLE CONDITIONS

                  Look at these programs.


                          If (3>2) AND (3>4)                              If (3>2) OR (3>4)

                          Then                                            Then

                               Write “Yes”                                      Write “Yes”

                          Else                                            Else

                               Write “No”                                       Write “No”



                                       No                                              Yes


                  What did you notice?

                  Both the programs have two IF conditions together joined either through AND or

                  OR. And the final result depends on the combination result.

                       AND: results in YES only if both the conditions are true. If any condition is false,
                       the result will be false.

                       OR: results in YES if any one of the conditions is true. If both are false, the result

                       will be false.

                  Now, write your answers for both.


                   1        If (you are a girl) AND (you are born in April)

                            Then

                                  Write “Both”
                            Else

                                  Write “None”



                   2        If (you are a girl) OR (you are born in April)


                            Then
                                  Write “Any one”

                            Else

                                  Write “None”



                   60      Touchcode–V
   57   58   59   60   61   62   63   64   65   66   67