Point takes one required parameter and one with a default value. Each option below is run on its own, after the class.
class Point:
def __init__(self, x, y=0):
self.x = x
self.y = y
Which lines run with no error? Choose every correct option.One or more options are correct. Tick all the correct ones: a wrong option costs marks, and a part-right answer earns part of the marks.
Log in to join the discussion.
Loading…