Page 362 - Information_Practice_Fliipbook_Class11
P. 362
9. 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.
10. How can we convert a string to an integer in Python?
Ans. Using int() method. For example, int('123') yields 123.
11. Is Python an object-oriented programming language?
Ans. Yes, Python is an Object-oriented Programming language.
12. What is an I-P-O cycle?
Ans. IPO cycle ("Input > Process > Output" cycle) represents the sequential stages through which data or actions
flow in a system where initial data (input) is transformed (process) to produce a result (output), which can then
influence subsequent actions (input).
13. What is the difference between RAM and ROM?
Ans. RAM refers to random access memory where both read and write operations can take place. But RAM is a
volatile memory; its contents are lost when power is turned off. ROM refers to read-only memory where only
read operation can take place. ROM is a non-volatile memory.
Both RAM and ROM are parts of the primary memory.
14. 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.
15. What is the difference between an expression and a statement in Python?
Ans. S.No. Expression Statement
An expression is a combination of symbols, A statement is defined as any programming
1
operators and operands. instruction given in Python as per the syntax.
2 An expression represents some value. A statement is given to execute a task.
A statement may or may not return a value as the
The outcome of an expression is always a
3 result.
value, for example, 3*7 + 10 is an expression.
print("Hello") is a statement.
16. What are mutable data types in Python?
Ans. Mutable data types in Python are data types that can be modified after creation. Some common examples of
mutable data types in Python include lists, dictionaries, and sets.
17. What is the default value of end parameter in print() function?
Ans. By default, the value of this parameter is '\n', i.e. the new line character.
18. What is the pupose of a break statement?
Ans. The break statement in Python is used to exit from a loop prematurely. It is typically used within loops (such as
for or while loops) to immediately terminate the loop's execution, even if the loop's condition or iteration hasn't
naturally completed.
348 Touchpad Informatics Practices-XI

