Inheritance in Python

 from ntn import chef

from chinesechef import chinesechef

mychef()=chef()
mychef.make_chickpeas()

mychinesechef()=chinesechef()
mychinesechef.make_tinde()

chef.make_chickpeas()
class chinesechef:
from ntn import chef

def make_tinde(self):
print("The chef made tinde")
class chef:

def make_spinach(self):
print("The Chef made spinach")

def make_chickpeas(self):
print("The Chef made chickpeas")

def make_special_dish(self):
print("The Chef made paneer")

Comments

Popular posts from this blog

Multiple linear regression for GW depth estimaition

Class in Python

To check if a student has a honor's degree (Using Class in python)