Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 130 - 2609_Logicode
P. 130

    3.  Write 'T' for true and 'F' for false.

                          a.  The range( ) function is used in the for loop to iterate over the numbers.

                          b.  The continue statement breaks the loops one by one.

                          c.  To come out of the infinite loop, we can either close the program window or press Ctrl + C.

                          d.  A sequence is a succession of values bound together by a single name.

                          e.  The while statement is the looping statement.

                      4.  Think and answer.

                          a.  What is looping?

                          b.  What are the values generated by the function range(10, 20, 2)?

                          c.   What is the use of Jump statement?

                          d.  Define the use of while statement with the help of an example.

                          e.   Write the difference between continue and break statements.

                                                                                                   21 st   #Critical Thinking
                      5.  Competency-based/Application-based questions.                         Century
                                                                                                  Skills  #Technology Literacy
                          a.   Swara wants to repeat a block of statements for a given number of times, until the control condition
                             is false. Which type of construct can she use for this?

                          b.   Manvi wants to write a statement which will cause the program to skip the rest of the statement
                             of the current block and move to the next iteration of the loop. Which statement should she use for
                             this?
                          c.  Shami is using a for loop to print the first 6 even numbers. Which range should he use to print them?

                      128   Premium Edition-VIII

| 125 126 127 128 129 130 131 132 133 134 135 |