Page 137 - Computer Science V2.0 Class 11
P. 137
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
inaccessible 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.
D. Answer the following questions:
1. Differentiate between a compiled and an interpreted programming language. Give one example of each.
Ans. A compiled language such as C++, converts the entire program (source code) into machine language (object code) in one
go. All the errors are reported together. Once all the errors are rectified, the program is re-compiled and executed.
In the case of an interpreted language such as Python, the interpreter converts the statements in the program into machine
language one by one. If the interpreter encounters an error in a statement, it must be rectified before the interpreter can
proceed further.
2. Who developed Python?
Ans. Guido van Rossum
Getng Started with Python Programming 123

