👤

Which line of code will create an instance of the pet class?

class pet:
def __init__(self,strSpecies,strName):
self.species = strSpecies
self.petName = strName

myPetA = pet('dog', 'Spot'), myPetA = pet(self, 'dog', 'Spot'), myPetA = new pet('dog', 'Spot'), myPetA .pet() = 'dog', 'Spot'

Answer :

Answer:

myPetA = pet(self, 'dog', 'Spot')

Explanation:

I mite be wrong

Answer:

myPetA=pet('dog','Spot') or C

Explanation:

credit to who deserves it, the guy in the other answers comment section confimed my thought

Go Teaching: Other Questions