Computer Science, asked by manoramant, 6 months ago

What is wrong with the following:

class Dog():
def __init__(self, new_name):
""" Constructor.
Called when creating an object of this type """

name = new_name
print("A new dog is born!")

# This creates the dog
my_dog = Dog("Rover")

Line 10 has 1 parameter, yet in line 2 we can see __init__ takes two parameters.

Lines 6 to 7 should not be indented.

Lines 9 and 10 should be indented.

On line 6, there should be a self. in front of name​

Answers

Answered by daniakhan55
0

Answer:

can't understand dear

Similar questions