Page 77 - Information_Practice_Fliipbook_Class11
P. 77
Assessment
A. Multiple Choice questions
1. The words that have special meaning for a Python interpreter are called _________________.
a. Literal b. Keyword c. Variable d. Token
2. Which of the following is a keyword in Python?
a. print b. Input c. PRINT d. None of these
3. Which of the following is a valid identifier?
a. Amrit singh b. #AmritSingh c. _AmritSingh d. Amrit&Singh
4. Which of the following always refers to a fixed value in Python?
a. Token b. Literal c. Keyword d. Operator
5. Which of the following is an escape sequence for a tab character?
a. \t b. \b c. \a d. \n
6. Which of the following is not an arithmetic operator?
a. * b. ** c. == d. //
7. Which of the following is a relational operator?
a. ** b. == c. // d. =
8. Which of the following operators is used to associate a data value with its variable?
a. == b. and c. != d. =
9. Which of the following is NOT true about variables?
a. A variable does not have a type associated with it.
b. A variable gets associated with the type of the object it refers to.
c. An identifier may denote a variable.
d. A variable is not declared explicitly.
10. Which of the following functions yields the unique object identifier of an object?
a. identifier() b. id() c. object() d. uniqueid()
11. By default, the function input() accepts a values as a ____________.
a. integer b. float c. list d. string
12. While using print() to print multiple values, which of the following is used as the default separator character?
a. Space b. Hyphen c. Newline d. Tab
13. While using print(), we use ____________ clause to terminate the output with a tab(\t).
a. print b. sep c. end d. newline
14. Which of the following is the correct method to assign values to multiple variables?
a. a = b = c, 10 b. a, b, c = 10 c. a, b, c = 5, 10, 20 d. a b c = 5 10 20
15. What will be the output produced on the execution of the following code segment?
x, y = 10, 20
x, y = y, x
print(x, y, sep='*')
a. 10*20 b. 20*10 c. 1020* d. *1020
16. Which of the following is NOT a built-in function?
a. input() b. max() c. sin() d. eval()
17. What value does max(4, 20, -20, -35, -4, 35) yield?
a. 35 b. -35 c. 4 d. -4
18. What will be the output produced on evaluating the following expression?
divmod(39, 5)
a. (4, 7) b. (7, 4) c. (7.0, 4.0) d. (4.0, 7.0)
Basics of Python Programming 63

