Page 357 - Informatics_Practices_Fliipbook_Class12
P. 357
86. What do we need to buy to use a copyrighted software?
Ans. We need to buy a software license.
87. What is IDLE?
Ans. IDLE (Interactive Development and Learning Environment) is an environment for developing Python programs
("scripts").
88. What are the two modes of working in Python?
Ans. Python provides two modes of working:
(i) Interactive mode
(ii) Script mode
89. List primitive data types in Python.
Ans. The primitive data types in Python are: integer, float, string, and boolean.
90. Is string a sequence data type?
Ans. Yes, a string is a sequence data type in Python programming.
91. What is the purpose of input() method?
Ans. The purpose of the input() method in Python is to take user input from the keyboard and store it as a string
for further processing in a program.
92. How the values are printed if we do not use the sep option of print() function?
Ans. If you don't use the sep option with the print() function in Python, it will print the specified values separated
by a space by default.
93. What are the different types of operators in Python?
Ans. Python has several types of operators, including:
(i) Arithmetic Operators: Perform mathematical operations (e.g., +, -, *, /, %, //, **).
(ii) Comparison Operators: Compare values and return Boolean results (e.g., ==, !=, <, >, <=, >=).
(iii) Logical Operators: Perform logical operations on Boolean values (e.g., and, or, not).
(iv) Assignment Operators: Assign values to variables (e.g., =, +=, -=, *=, /=, %=, //=, **=).
(v) Membership Operators: Check for membership in a sequence (e.g., in, not in).
94. Why do we use the modulo (%) operator?
Ans. The modulo operator (%) in Python is used to find the remainder of a division operation between two numbers.
It returns the remainder of the division of the first number (the dividend) by the second number (the divisor).
For example, 5%2 shall return the result as 1, remainder obtained when we are dividing 5 by 2.
95. Which operators are used to compare the values of operands?
Ans. Relational operators.
96. How can we convert a string to an integer in Python?
Ans. Using int() method. For example, int('123') yields 123.
97. Is Python an object-oriented programming language?
Ans. Yes, Python is an Object-oriented Programming language.
98. 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
reserved words which possess special meaning. An identifier is a unique name given to a particular variable,
function or label of class in a program.
Viva Voce Questions 343

