Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 104 - 2620_Birla Open Mind C-8
P. 104

    Now, write your answers for both.
                  1.   If (you are a girl) AND (you are born in April)      2.   If (you are a girl) OR (you are born in April)

                      Then                                                  Then
                         Write “Both”                                          Write “Any one”
                      Else                                                  Else
                         Write “None”                                          Write “None”

                           Double Tap                                           Century   #Critical Thinking
                                                                                  21 st
                                                                                  Skills  #Productivity & Accountability

                         Write the result for the following conditions if num1 is 200 and num2 is 400:
                          If (num1 > 250) OR               If (num1 > 250) AND             If (num1 < 250)
                          (num2 > 250)                     (num2 > 250)                    Then
                          Then                             Then                               Write “TEA”
                             Write “TEA”                      Write “TEA”                  Else
                          Else                             Else                               Write “COFFEE”
                             Write “COFFEE”                   Write “COFFEE”

                             Interdisciplinary Learning

                             #Mathematics

                     Write a conditional statement to check whether a student has passed or failed. The
                     criteria for declaring a student as passed or failed are listed below:

                     For, percentage >= 40 : Pass
                     For, percentage < 40 : Fail

                                                                                                                 #Activity

                        LOOPS IN A PROGRAM

                  A loop is used to execute instructions or a block of code multiple times, without writing it repeatedly. A
                  sequence of instructions when repeated for a fixed number of times or until a condition is true is called
                  a loop. When a loop repeats forever (endlessly), it is called an infinite loop. There are two types of loops.

                       Counting loops: These repeat a block of code for a fixed number of times.
                       Conditional loops: These repeat a block of code until a certain condition is reached which means

                     they keep going until some condition remains true.

                      102  Premium Edition-VIII

| 99 100 101 102 103 104 105 106 107 108 109 |