Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 148 - 2612 Digimind C6
P. 148

    d.   After calculating the total marks, Rohit wants the result to appear on the computer screen. Which
                            Python function should he use to display the output?

                             (i)  Takes user input                          (ii)  Saves a file

                            (iii)  Terminates a program                     (iv)  Displays output on the screen

                         e.   Kavya wants to save her Python program so that she can run and modify it later. Where should she
                            write her code to save and reuse the program?
                             (i)  Python Shell                              (ii)  Python Editor’s window

                            (iii)  Command Prompt                           (iv)  Text Editor

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

                                          Comments, Interpreted, Quotes, Operands, High-level

                         a.  Python is a __________ object-oriented programming language.

                         b.  To write a multi-line comment in Python, we use the triple __________.
                         c.  Python is also an __________ language that executes code line by line.

                         d.  The values that the operators use to get the output are called __________.

                         e.  __________ in Python can be used to explain parts of the code.

                      3.  Answer in one or two words.

                         a.  Who is the creator of Python?                                                   ___________
                         b.  What type of language is Python in terms of memory allocation?                  ___________

                         c.  What is the file extension for Python files?                                    ___________
                         d.  What is the name of the interactive Python code writing environment?            ___________

                      4.  Think and answer.
                         a.  Describe the use of the input() function in Python.

                          _______________________________________________________________________________

                          _______________________________________________________________________________
                         b.  What is the difference between Python's Interactive Mode and Script Mode?

                          _______________________________________________________________________________

                          _______________________________________________________________________________

                          _______________________________________________________________________________

                          _______________________________________________________________________________

                      146   Premium Edition-VI

| 143 144 145 146 147 148 149 150 151 152 153 |