Programs with Modular Architecture Quick Check 1 of 51 of 5 Items Question Which line in the following code is creating the spot Dog? 1 class Dog: 2 def __init__(self, breed, color): 3 self.breed = breed 4 self.color = color 5 def output(self): 6 print(self.breed + " " + self.color) 7 spot = Dog("lab","black") 8 spot.output() (1 point) Responses line 7 line 7 line 8 line 8 line 2 line 2 line 1 line 1 Skip to navigation page 9 of 9

1 answer

The line in the following code that is creating the spot Dog is:

line 7

This line calls the constructor of the Dog class to create a new instance of Dog with the breed "lab" and color "black", and assigns it to the variable spot.