Page 105 - Information_Practice_Fliipbook_Class11
P. 105
4. Which of the following denotes a mapping?
a. list b. set c. tuple d. dict
5. In a dictionary, which operator separates the key from its value?
a. : b. ; c. , d. '
6. Which of the following operators has the highest precedence?
a. * b. ** c. / d. //
7. Which of the following is NOT True about syntax errors?
a. A syntax error is a mistake in applying the rules of a programming language.
b. When a syntax error is encountered, Python interpreter stops execution of the program.
c. A syntax error will be generated, if the user enters a string instead of a number.
d. When a syntax error is encountered, the interpreter displays the type of error along with the error message.
8. Which of the following is the correct characteristic of a logical operator?
a. It yields either True or False.
b. It compares two values.
c. It checks for a value in a sequence.
d. There are only two logical operators.
B. State whether the following statements are True or False:
1. Literals of type int may be positive or negative. _________
2. id() is used to determine the type of a data object. _________
3. Arithmetic operations cannot be performed on a string. _________
4. The data items in a list have to be of the same data type. _________
5. A tuple is enclosed in square brackets. _________
6. A dictionary does not allow repeated keys. _________
7. The value None denotes False. _________
8. The unary operators have lower precedence than binary operators. _________
9. While executing a Python program, the statement with a syntax error is skipped and the next
statement is executed. _________
10. A program with a logical error will not give any output. _________
C. Fill in the blanks.
1. We can perform arithmetic operations on ____________ types of data.
2. A ____________ number is a combination of real and imaginary numbers.
3. An expression which evaluates as True or False is a ____________ expression.
4. The index zero denotes the ____________ element in a sequence.
5. A ____________ operator is used to compare the values of operands on either side.
6. An ____________ in Python is a valid combination of objects and operators.
7. A pair of ____________ is used to override the precedence of operators.
8. Explicit conversion is also called ____________.
9. The process of identifying and removing logical errors is known as ____________.
10. A ____________ error will be generated,on interpreting int(num), if num is a string that cannot be converted to an int,
for example, '$100'.
D. Answer the following questions:
1. Identify the data type for the following data objects:
(i) "Kamani"
Data Types and Operators 91

