Computer Science, asked by PRANAYCHOWDARY, 7 months ago

Explain inheritance class with suitable example.
in python?

Answers

Answered by shirishanaidu499
2

Answer:

Inheritance enables us to define a class that takes all the functionality from a parent class and allows us to add more. In this tutorial, you will learn to use inheritance in Python.

Explanation:

To demonstrate the use of inheritance, let us take an example.

A polygon is a closed figure with 3 or more sides. Say, we have a class called Polygon defined as follows.

Similar questions