Page 146 - Touchpad_Plus_V3.2_Class 8
P. 146

D.  Short answer type questions.

                     1.  What is looping?

                        ...................................................................................................................................................................................................
                     2.  Write the syntax of the for loop.

                        ...................................................................................................................................................................................................
                     3.  What is the use of Jump statement?

                        ...................................................................................................................................................................................................


                  E.  Long answer type questions.

                     1.  What do you understand by Infinite Loop? Explain with an example.

                        ...................................................................................................................................................................................................

                        ...................................................................................................................................................................................................

                        ...................................................................................................................................................................................................

                     2.  Define the use of while statement with the help of example.

                        ...................................................................................................................................................................................................

                        ...................................................................................................................................................................................................


                        ...................................................................................................................................................................................................
                     3.  Distinguish between continue and break statements.


                        ...................................................................................................................................................................................................

                        ...................................................................................................................................................................................................

                        ...................................................................................................................................................................................................

                  F.  Write the output of the following programs:
                     1. x = 1
                      sum=0
                      while(x<=10):
                          sum=sum+x
                          x=x+1
                      print (sum)

                     2. i = 2
                      while True:
                          if i%3 == 0:
                              break
                          print(i)
                          i += 2







               144      Plus (Ver. 3.2)-VIII
   141   142   143   144   145   146   147   148   149   150   151