Multiple Choice Question For Data Handling Class 11 Computer Science (CS), Informatics Practices (IP)
1. Which of the following are valid Python data types?
(a) Numeric
(b) None
(c) Mappings
(d) list
(e) Sequence
(f) set
(g) tuple
(h) dictionary
2. Which of the following are data types amide-red as Numbers in Python.
(a) Integer
(b) Boolean
(c) complex
(d) floating point
(e) list
(f) None
3. Consider the following sequence of statements:
a = 35
m = a
Following the execution of these statements, Python has created how many objects and how many references ?
(a) Two integer objects, two references
(b) One integer object, two references
(c) One integer object, one reference
(d) Two integer objects, one reference
4. Which Python built-in function returns the unique number assigned to an object?
(a) identity()
(b) .id()
(c) refnum()
(d) ref()
5 The operator used to check if both the operands reference the same object memory, is the _____ operator.
(a) in
(b) is
(c) id
(d) ==
6. For two objects and y, the expression x is y will yield True, if and only if
(a) id(x) = id(y)
(b) len(x) == len(y)
(c) x == y
(d) all of these
7. Which of the following is not an immutable type in Python?
(a) String
(b) Tuples
(c) Set
(d) dictionary
8. Python operator always yields the result of _____ data-type.
(a) integer
(b) floating point
(c) complex
(d) all of these
9. What is the value of the expression 100/25 ?
(a) 4
(b) 4.0
(c) 2.5
(d) none of these
10. What is the value of the expression 100//25?
(a) 4
(b) 4.0
(c) 2.5
(d) none of these
11. In Python a variable must be declared before it is assigned a value.
(a) True
(b) False
(c) Only in Functions
(d) Only in modules
12. In Python, a variable is assigned a value of one type, and then later assigned a value of different type. This will yield _____.
(a) Warning
(b) Error
(c) None
(d) No Error
13. In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type. This concept is known as _____.
(a) mutability
(b) static typing
(c) dynamic typing
(d) immutability
14. Is it safe to directly use the == operator to determine whether objects of type float are equal ?
(a) Yes
(b) No
(c) Yes, if the values are < 100
(d) Yes, if the values are > 100
15. What will the following code produce?
a = 8.6
b = 2
print (a//b)
(a) 4.3
(b) 4.0
(c) 4
(d) compilation
16. In the Python statement x = a + 5 - b, a and b are _____.
(a) Operands
(b) Expression
(c) operators
(d) Equation
17. In the Python statement x = a + 5 - b, a + 5 - b is _____.
(a) Operands
(b) Expression
(c) operators
(d) Equation
18. What will be the value of y after following code fragment is executed ?
x = 10.0
y = (x < 100.0) and x >=18
(a) 110
(b) True
(c) False
(d) Error
19. Which of the following literals has True truth-value ?
(a) 0.000001
(b) "None
(c) 0
(d) []
(e) False
(f) True
(g) 1
(h) 33
(i) None
(j) 0.0
20. What will the following code result as?
import math
x = 100
print (x > 0 and math.sqrt(x))
(a) True
(b) 1
(c) 10
(d) 10.0
21. Which of the following operators has the lowest precedence ?
(a) not
(b) %
(c) and
(d) +
(e) **
22. What is the value of the expression 10 + 3 ** 3 * 2 ?
(a) 28
(b) 739
(c) 829
(d) 64
23. To increase the value of x five times using augmented assignment operator, the correct expression will be
(a) x += 5
(b) x *= 5
(c) x = x ** 5
(d) none of these
24. What will be the result of the expression 10 or 0 ?
(a) 0
(b) 1
(c) 10
(d) 1.0
25. What will be the result of the expression 5 or 10 ?
(a) 5
(b) 1
(c) 10
(d) 0
26. What will be the result of the expression 5 and 10?
(a) 5
(b)1
(c) 10
(d) 0
27. What will be the result of the expression 15 and 10?
(a) 5
(b)1
(c) 10
(d) 0
28. What will be the result of the expression 10 or 0?
(a) 0
(b)1
(c) 10
(d) 1.0
29. What will be the result of the expression ‘a’ or ‘ ’ (‘’ is an empty string?
(a) ‘a’
(b) “”
(c) 1
(d) 0
30. What will be the result of the expression and ‘ ’ (‘’ is an empty string?
(a) ‘a’
(b) “”
(c) 1
(d) 0
31. What will be the result of the expression ‘x’ and 'a' ?
(a) ‘a’
(b) “”
(c) ‘x’
(d) 1
32. What will be the result of the expression: ‘a’ and 'x'?
(a) ‘a’
(b) “”
(c) ‘x’
(d) 1
33. What will be the result of the expression 'a' and ‘None’?
(a) ‘a’
(b) “”
(c) ‘None’
(d) 1
34. What will be the result of the expression 'None' and ‘a’?
(a) ‘a’
(b) “”
(c) ‘None’
(d) 1
35. What will be the result of the expression ‘false’ and False ?
(a) false
(b) False
(c) 'false'
(d) “False”
36. What will be the result of the expression ‘false’ or False ?
(a) false
(b) False
(c) 'false'
(d) “False
The first question's answer is wrong
ReplyDeleteNo, it is correct question.
Deletewould this question come in any exam ? or are these just own questions made by your website?
ReplyDeleteThese are not PYQS
DeleteYour 7th answer is wrong
ReplyDeleteIt is correct please check again.
DeleteYou are wrong and make more questions
ReplyDeleteAre all this answers correct??
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )