1. Home
  2. Subjects
  3. Data Science
  4. Python

Python MCQs · Page 7

595 multiple choice questions with answers in Data Science.

Showing 151–175 of 595

What is the output of the following Python code snippet?

class A:
__slots__ = ('x',)
a = A()
try:
a.y = 10
except AttributeError:
print('AttributeError')
  1. AttributeError Correct answer
  2. 10
  3. None
  4. Error
MCQSEXAM Read explanation