Page 44 - PYTHON-11
P. 44
13. What is the order of precedence of logical operators?
Ans. The order of precedence of logical operators is NOT, AND, OR.
14. Which logical gates are called universal gates?
Ans. NAND and NOR logical gates are called universal gates.
15. What is a flowchart?
Ans. A flowchart is a pictorial or graphical representation of a task. Flowcharts are drawn using certain special-
purpose symbols such as rectangles, diamonds, ovals and circles. These symbols are connected using
arrows termed as flow lines.
16. What is an algorithm?
Ans. An algorithm is defined as a step-by-step procedure designed to perform an operation which will lead to
the desired result.
17. 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.
18. Who developed Python and when?
Ans. Guido van Rossum, a Dutch programmer, developed Python in 1991.
19. Why is Python easy to learn?
Ans. Python has relatively few keywords, simple structure and a clearly defined syntax. This allows the user to
understand and work easily in a relatively short period of time.
20. Which is the smallest individual unit in a program?
Ans. Token.
21. What is IDLE?
Ans. IDLE (Integrated Development and Learning Environment) is an environment for developing Python programs
(‘scripts’) in Windows and other operating systems.
22. What are the two working modes of Python?
Ans. The two working modes of Python are:
(a) Interactive mode (Shell mode) (b) Script mode (Editor mode)
23. 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.
24. What is None literal in Python?
Ans. Absence of value or literal that has not yet been created.
25. 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.
26. Name the three key attributes of an object in Python.
Ans. The three key attributes are: a type, a value and an identity(id).
27. What is the difference between a keyword and an identifier?
Ans. Every language has keywords and identifiers which are only understood by its compiler. Keywords are
predefined or reserved words which possess special meaning. An identifier is a unique name given to a
particular variable or function in a program.
28. Why is the following statement invalid in Python?
x + 1 = x
Ans. The statement is invalid because an expression cannot be placed on the left of the ‘=’ sign. Therefore, the
correct statement will be:
x = x + 1
V.2