Page 84 - Code Craft Computer-8
P. 84

3.    To print sum of first five natural numbers

                     4.    To print even numbers from 1 to 60
                     5.    To print numbers divisible by 12 from 1 to 200

              B.     Find the output of the following programs.
                     1.














                     2.










                     3.













              C.     Write the output of the following programs:
                     1.  i=0
                          while i<=10:
                          print(I)
                          i=i+1


                     2.  x=1
                          sum=0
                          while (x<=15):
                          sum=sum+x
                          x =x +1
                          print (sum)


                     3.  colours= ["red", "yellow”, "pink"]
                          for x in colours:
                          print (x)



                                                                 84
   79   80   81   82   83   84   85   86   87   88   89