Page 25 - ipp11
P. 25
VIVA VOCE
1. What is Python?
Ans. Python is an easy-to-learn, general-purpose, dynamic, interpreted, high-level, multi-platform, powerful
programming language. It has efficient high-level data structures and a simple but effective approach to
object-oriented programming.
2. What is IDLE?
Ans. IDLE (Integrated Development and Learning Environment) is an environment for developing Python
programs (scripts) on Windows and other operating systems.
3. What are the two modes of working in Python?
Ans. Python provides two working modes such as:
(a) Interactive mode
(b) Script mode
4. What is a variable?
Ans. A variable is an identifier/placeholder that holds a value. In other words, a variable is a reference to a
computer memory location where the value is stored.
For example, z=87; here, z is a variable that holds the value 87 and stores it in memory.
5. What can a variable hold in Python?
Ans. In Python language, a variable can hold a string, a number or several other objects such as a function or
a class. Variables can be assigned different values during execution.
6. Which is the smallest individual unit in a program?
Ans. Token.
7. What do you understand by the term data type?
Ans. Data type refers to the type of value used in a program. For example, integer, float, string, etc.
8. Name the three key attributes of an object in Python.
Ans. Each object in Python has three key attributes: a type, a value and an identity (id).
9. What is the significance of is operator?
Ans. The identity operator is checks if two variables refer to identical objects in memory.
10. What is the purpose of indentation in Python?
Ans. Indentation serves to define code blocks and aids program structure and readability.
11. Define a keyword.
Ans. A keyword is a reserved word in the Python programming language which conveys some special meaning.
Keywords are used to perform a specific task in a computer program.
12. What are literals in Python?
Ans. A literal is a fixed value in a program, such as string literals, numeric literals and Boolean literals.
13. Define a sequence construct.
Ans. A sequence construct constitutes all the statements which are executed sequentially, i.e., one after the
other.
14. What is selection construct?
Ans. A selection construct involves execution of the statements on the basis of certain test conditions.
15. Name three sequential data types in Python.
Ans. List, Tuple and String.
16. Why is the given statement invalid in Python?
x + 1 = x
Ans. The statement is invalid because an expression cannot be placed on the left of the assignment operator
‘=’. Therefore, the correct statement would be
x = x + 1
V.1