+1 vote
in Class 12 by kratos

Give a suitable example using Python code to illustrate single level inheritance considering COUNTRY to be BASE class and STATE to be derived class.

1 Answer

+3 votes
by kratos
 
Best answer

Class COUNTRY: statejist = [ ]

definit(self, name):

self.name = name class state (COUNTRY):

definit(self, name, capital): super ( ).init(name)

self.capital = capital

...