Page 55 - tp_Modula_v2.0
P. 55

Critical Thinking

                 G.   Application based question.
                     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?



                                                   In the lab                                  Technology Literacy



                   Write a program to:
                   1.   determine whether a given number is an Armstrong number or not.

                   2.  to print the numbers 8, 11, 14, 17, 20, . . . .
                   3.  print 1 to 100 using while loop.

                   4.   find out the sum of numbers within the range 1 to 100 using while loop.
                   5.  calculate the sum of first ten even numbers by using while loop and for loop.
                   6.   print first 20 odd numbers in decreasing order using while loop.







                  Teacher's Corner

                 1.   Discuss about all the iterative statements of Python with the students.
                 2.   Go through all the topics covered in this chapter.









































                                                                                  Looping Statements in Python    53
   50   51   52   53   54   55   56   57   58   59   60