Skip to content

den01-python-programming/exercise-5-9-biggest-pet-shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise 5.9 Biggest pet shop

Two classes, Person and Pet, are included in the exercise template. Each person has one pet. Modify the __str__ method of the Person class so that the string it returns tells the pet's name and breed in addition to the person's own name.

lucy = Pet("Lucy", "golden retriever")
leo = Person("Leo", lucy)

print(leo)
Leo, has a friend called Lucy (golden retriever)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages