Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
What does class Dog(Animal): mean? | StemPy Lab
Quizzes
/
What does class Dog(Animal): mean?
Python Programming
Easy
High School (11–12)
High School (9–10)
Undergraduate
General
Python Going Further › Inheritance and Special Methods
Python Going Further › Classes and Objects
Created by
StemPy Lab
What does class Dog(Animal): mean?
Dog is built on Animal and gets its attributes and methods
Dog contains an Animal object
Dog is a function that takes an Animal
Animal is built on Dog
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A class has def __init__(self, items=[]) and self.items = items. Two objects are made with no argument. What is the problem?
A child class overrides a method of its parent. Which version runs for an object of the child? →
More on
Python Going Further › Inheritance and Special Methods
Python Going Further › Classes and Objects
Discussion (0)
Log in
to join the discussion.
Loading…
Problems on this topic
For each pair, say whether you would use inheritance (is a) or composition (has a), and why.
Easy
A class Note has an attribute rupees. Write __lt__ and __str__ so that sorted puts a list of notes…
Medium
For each line of code, name the special method that Python calls.
Easy
The loop below works for any animal. Add a class Bird that says Tweet, and a class Parrot built on…
Medium
All problems on this topic →