Page 55 - Dig_CodeAI_V2.1_Class_8
P. 55

4





































                                                     Algorithmic


                                                     Intelligence




                   Learning Outcomes


                      Multiple Conditions in a Program              Loops in a Program


                                                                                        Critical Thinking


                     Write the output of the following statements:


                      1. age = 25                                 2. marks = 25
                        IF age >= 18 THEN                           IF marks >= 60 THEN

                            PRINT "You can vote"                        PRINT "First Division"
                        ELSE                                        ELSE

                            PRINT "You cannot vote"                     PRINT "You can do better!








                 We learnt about writing algorithms for a program and using conditional statements in a program.
                 Let us learn multiple conditions and loops in a program.

                                                                                     Algorithmic Intelligence  53
   50   51   52   53   54   55   56   57   58   59   60