Page 53 - Information_Practice_Fliipbook_Class11
P. 53

Ø   Using the Shell window and the Editor window, IDLE enables working with Python in the Interactive Shell
                  mode and the Script Mode, respectively.

              Ø   The interactive Python interpreter is also known as the Python Shell.
              Ø   To be able to save Python code for future use, we use the Python Editor. This mode of working in Python is
                  called the script mode.

              Ø   The Python programs, also known as Python scripts are saved in files with the extension .py.





                                                  Solved Exercises



            A.  Multiple Choice questions:
               1.  Which of the following is not a high-level programming language?
                  a.  BASIC                b. C++                 c. Assembly           d. Python
               2.  Which of the following is an interpreter-based language?
                  a.  Pascal               b. Python              c. C                  d. C++
               3.  Which of the following is NOT a characteristic of the Python language?
                  a.  Interpreter Based    b. Open Source         c. Platform independent  d. Compiler based
               4.  Which of the following is the correct symbol for the IDLE prompt?
                  a.  >>>                  b. $$$                 c. >>>>               d. $$$$
               5.  Which of the following is the correct extension for a Python program?
                  a.  python               b. .py                 c. .pyth              d. .p
               6.  Which of the following is the correct shortcut key to execute a Python script?
                  a.  F2                   b. F3                  c. F4                 d. F5

               7.  Which of the following is the correct shortcut key to close the IDLE window?
                  a.  Alt +F4              b. Ctrl + F4           c. Shift + F4         d. F4
               8.  Which of the following is a valid print() command?
                  a.  print(Computers)     b. print("Computers")   c. print ("Computers)   d. PRINT("Computers")
            B.  State whether the following statements are True or False.
               1.  An interpreter converts a high-level language to a machine language.                    _________
               2.  The program in the machine language of the computer is called the source code.          _________
               3.  The compiler generates the object code after all the errors in the program are removed.   _________
               4.  We can save commands while working in interactive mode.                                 _________
               5.  A file containing Python instructions is called a Python script.                        _________
               6.  The output of a Python script is displayed in IDLE Shell.                               _________

            C.  Fill in the blanks.
               1.  A program written in a high-level programming language is called the ____________ code.
               2.  A computer only understands ____________ language.
               3.  Python is a programming language developed by ____________.
               4.  Objects which are no longer accessible in a program are collectively called ____________ and the process of deleting the
                  accessible objects is called ____________.
               5.  The Shell Window allows us to work in ____________ mode, while the Editor window allows us to work in ____________
                  mode.
               6.  The ____________ instruction is used to display the output.
               7.  ____________ is the shortcut key to repeat the previous command.


                                                                           Getng Started with Python Programming  39
   48   49   50   51   52   53   54   55   56   57   58