Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 145 - 2612_Digimind
P. 145

    e.   A student writes a program where the next statement executes only after the previous one finishes,
                            with no condition involved. This execution path is also known as:
                             (i)  Decision path                               (ii)  Loop path

                            (iii)  Straight line path                        (iv)  Branching path

                     2.  Fill in the blanks using the words from the help box.

                                                Nested, if, Sequentially, Control, Multiple

                        a.   Statements in a program are normally executed _____________, one after the other.

                        b.   Statements used to change the flow of execution of a program are called _____________ statements.

                        c.   The decision-making statement that controls the flow of execution is the _____________ statement.

                        d.   The if-elif-else statement is used to evaluate _____________ conditions or scenarios.

                        e.   When an if statement is placed inside another if statement, it is called a _____________ if statement.

                     3.  Answer in one or two words.
                        a.   What is a set of instructions given to a computer called?                     ____________

                        b.  What is the term for writing an if statement inside another if statement?      ____________
                        c.   Which statement is used to evaluate multiple scenarios in a programming
                            language?                                                                      ____________

                        d.   What is the programming construct that affects the flow of execution in a
                            program?                                                                       ____________

                        e.   What is evaluated inside an if condition to make a decision?                  ____________

                     4.  Think and answer.

                        a.  Define the term computer program.

                            ______________________________________________________________________________

                            ______________________________________________________________________________

                        b.  What is the use of control structure in Python?

                            ______________________________________________________________________________

                            ______________________________________________________________________________

                        c.  Explain the difference between sequential and selection statements.

                            ______________________________________________________________________________

                            ______________________________________________________________________________
                            ______________________________________________________________________________

                                                                                            Control Structures in Python  143

| 140 141 142 143 144 145 146 147 148 149 150 |