Question: def print _ info ( self ) : print ( ' Pet Information: ' ) print ( ' Name: ' , self.name ) print (
def printinfoself:
printPet Information:
print Name: self.name
print Age: self.age
class DogPet:
def initself:
Pet.initself
self.breed
mypet Pet
mydog Dog
petname input
petage intinput
dogname input
dogage intinput
dogbreed input
# TODO: Create generic pet using petname, petage and then call printinfo
# TODO: Create dog pet using dogname, dogage, dogbreed and then call printinfo
# TODO: Use mydog.breed to output the breed of the dog
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
