Basic HTML Version

|  | Table of Contents |  | View Full Version

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

    21 st   #Initiative
                              A Better Me!                                                            Century   #Responsibility
                                                                                                        Skills

                              A few of your friends have been editing and sharing codes of other classmates without their
                              knowledge. What should you do in this situation?

                              DIY In The Lab                                         Century   #Technology Literacy
                                                                                       21 st
                                                                                           #Critical Thinking
                                                                                       Skills
                     To
                     Subject   Coding

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

                       b.  use the for loop to print the numbers 8, 11, 14, 17, 20, . . . , 83, 86, 89.

                       c.  use the for loop to print the numbers 100, 98, 96, . . . , 4, 2.
                       d.  print first 100 natural numbers using while loop.

                       e.   find out the sum of numbers within the range 1 to 100 using while loop.

                       f.  calculate the sum of first ten even numbers by using the while loop and the for loop.
                       g.  print first 20 odd numbers in decreasing order using while loop.

                     For The Teacher

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

                                                                                                       #Loops in Python 123

| 120 121 122 123 124 125 126 127 128 129 130 |