Page 142 - TechPluse_C8_Flipbook
P. 142

C.  Fill in the blanks using the words given below:

                                                 Hints

                                                  False, True, Else, Infinite, Built-in, Non-zero



                      1.   In Python, the non-zero value is interpreted as ......................
                      2.     The ..................... block will be executed if and only if the provided condition evaluates to false.

                      3.   The range() function is a\an ..................... function of Python.
                      4.     Any ...................... value in the while loop indicates an always true condition whereas zero indicates
                           ...................... condition.

                      5.   The ...................... loop never ends.
                  D.  Short answer type questions.

                      1.   What is decision making statement?
                           .......................................................................................................................................................................

                      2.   Write the syntax for the if…elif…else statement.
                           .......................................................................................................................................................................

                      3.   Write the syntax of the if statement.
                           .......................................................................................................................................................................
                      4.   What is looping?
                           .......................................................................................................................................................................

                      5.   Write the syntax to the for loop.
                           .......................................................................................................................................................................


                      6.   What is a function?
                           .......................................................................................................................................................................

                  E.   Long answer type questions.

                      1.   Draw the flowchart for nested if statement.
                      2.   Write a python program to convert centimeters to inches. Hint: 1 inch = 2.54 cms

                      3.   Draw the flowchart of the for loop.
                      4.   Define the use of while statement with the help of example and flowchart.
                      5.   Distinguish between continue and break statements.


                                                         Mind Boggler



                                                                                                      Computational Thinking
                      What will be the output of the following programs.
                      1.  a = int ( input ( "Enter a First Number: " ) )
                           b = int ( input ( "Enter a Second Number: " ) )
                           if a > b :



              140       Premium Edition-VIII
   137   138   139   140   141   142   143   144   145   146   147