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

Python MCQs · Page 12

595 multiple choice questions with answers in Data Science.

Showing 276–300 of 595

What is the output of the following Python code snippet?

class Point:
def __init__(self, x, y):
self.x, self.y = x, y
def __repr__(self):
return f'Point({self.x}, {self.y})'
print(Point(1, 2))
  1. <__main__.Point object>
  2. (1, 2)
  3. Error
  4. Point(1, 2) Correct answer
MCQSEXAM Read explanation