Page 58 - Touchcode_C4_Flipbook
P. 58

4.2                              PROGRAMS : CONDITIONS










                  If and then statements are conditionals. For example,


                     Example 1:
                     If

                          It is Maths class
                     Then
                          Take out Maths book & notebook
                                                                         A conditional is an action

                                                                         that occurs if something
                     Example 2:
                     If                                                  specific happens.

                          It is raining
                     Then

                          Carry an umbrella
                     Else
                          Do not carry an umbrella






                                         Yes               If (Condition)                 No
                                                          to be checked
                                        Then                                              Else

                         Do this                                                                    Do that



                  Look us look at another Program to check whether you are pass or fail.


                     Read marks

                     If marks is > 50

                          Display Pass

                     Else

                          Display Fail





                   56      Touchcode-IV
   53   54   55   56   57   58   59   60   61   62   63