Computer Science, asked by PranitaKumari, 5 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")

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

b)Lines 6 to 7 should not be indented.

c)Lines 9 and 10 should be indented.

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

Answers

Answered by taban1234ns
0

nothing wrong ...........GG........

Similar questions