class course(object): def __init__(self,name,fees): self.cname=name self.cfees=fees def coursedetail(self): print("course name: ",self.cname) print("course fee: ",self.cfees) class student(course): def __init__(self,sname,cname,cfees): course.__init__(self,cname,cfees) self.name=sname def studetail(self): print("student name: ",self.name) ss=student("amit","java",3000) ss.studetail() ss.coursedetail()