Page 141 - TechPluse_C8_Flipbook
P. 141

Checkpoint



                 A.  Tick ( ) the correct option.
                          ü
                     1.   Which of the following conditional statements is used to test multiple conditions?

                          a.  if                                            c.   if…else

                          b.  if…elif…else                                  d.   All of these

                     2.   What will be the output of the following code?

                          if(True):
                              print(“Hello”)

                          else:
                              print(“Hi”)

                          a.   Hello                                        c.   Hi

                          b.   Hello Hi                                     d.   Nothing will print
                     3.    Which of the following is not the conditional statement in Python?

                          a.   if Statement                                 c.    if…else Statement

                          b.   if...elif...else Statement                   d.   None of these

                     4.   Which of the following is a looping statement in Python?

                          a.   for statement                                c.   if...else statement
                          b.   if statement                                 d.   break statement

                     5.   Which of the following statements allow to repeat a task for a fixed number of times?

                          a.   for statement                                c.   while statement
                          b.   if…else statement                            d.   continue statement

                     6.   Which of the following functions is an in-built function in Python?

                          a.   print                                        c.   statement

                          b.   multiplication                               d.   addition

                 B.  Write 'T' for true and 'F' for false.
                     1.     The if statement executes a command if the provided condition

                          evaluates to true.                                                               ......................
                     2.   The if...elif...else statement allows you to test multiple conditions.           ......................
                     3.   We can use do-while loop in Python.                                              ......................

                     4.   The continue statement breaks the loops one by one.                              ......................

                     5.   We cannot create our own functions in Python.                                    ......................


                                                                Conditional and Looping Statements in Python         139
   136   137   138   139   140   141   142   143   144   145   146