Look at the following class definition: class Bird: def _ _init_ _(self, bird_type): self._ _bird_type = bird_type

Question:

Look at the following class definition:

class Bird:

def _ _init_ _(self, bird_type):

self._ _bird_type = bird_type

Write the code for a class named Duck that is a subclass of the Bird class. The Duck class’s _ _init_ _ method should call the Bird class’s _ _init_ _ method, passing ‘duck’ as an argument.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: