Quiz: Object-Oriented Idioms
Evaluate your knowledge of Python 3 object-oriented programming concepts by taking this quiz. This lesson helps you consolidate your understanding of idioms related to object references, copying, methods, exceptions, and operator overloading.
We'll cover the following...
We'll cover the following...
Choose the possible correct answer(s).
1.
Deduce the output of the following program.
tuple1 = ('a', 'b', [1, 2])
tuple2 = ('a', 'b', [1, 2])
print(tuple1 == tuple2)
tuple1[-1].append(3)
print(tuple1 == tuple2)
A.
It will generate an error, as tuples are immutable datatypes.
B.
False
False
C.
True
False
D.
True
True
1 / 8
We hope ...