Hybrid Inheritance in Python | Python Tutorials for Beginners #lec93

preview_player
Показать описание
In this lecture we will discuss:
- What is Hybrid inheritance?
- Program using Hybrid Inheritance
- Assignment question on Hybrid Inheritance

*********************************************

Connect & Contact Me:

*******************************************

More Playlists:

#inheritance #pythonforbeginners #python #pythonprogramming #jennyslectures
Рекомендации по теме
Комментарии
Автор

Only teacher whose every word directly goes in to your heart ❤️❤️❤️❤️❤️❤️

Marvelkashmir
Автор

Mam your teaching way is very simple student will easily understand it ❤👍👍♥️

anujrathore
Автор

Thank you, just finished this lecture, I learned alot.

flipdruid
Автор

Thank you ma'am, one request- Could you please cover DSA in Python in this series? Thank you so much for all your efforts ma'am❤️

randouser
Автор

Me koyi nahi samaj sakta tha inheritance bare me isee tarah video..

Mahaan sikshan...

sivayaswanth
Автор

Mam can you please tell some best books to refer for python -basic to advance

darshangowdac
Автор

I got error maam ...can you help me
class University:
def __init__(self, uname):
self.uname=uname
def detailes(self):
print("University name : ", self.uname)

class Course(University):
def __init__(self, cname, uname):
super().__init__(uname)
self.cname=cname

def detailes(self):
print(f"I did {self.cname} course from {self.uname}")

class Branch(University):
def __init__(self, branch, uname):
super().__init__(uname)
self.branch=branch
def detailes(self):
print(f"I studied {self.branch} from {self.uname}")

class Student(Branch, Course):
def __init__(self, name, branch, cname, uname):
self.name=name
super().__init__(branch, uname)
super().__init__(cname, uname)
def detailes(self):
print(f"I am {self.name} as a student . i'm doing {self.branch} course is {self.cname} from {self.uname}")

class Faculty(Branch):
def detailes(self):
print("faculty")

u1=University("IIT")
u1.detailes()

c1=Course("python", "IIT")
c1.detailes()

b1=Branch("Computer Science", " IIT ")
b1.detailes()

s1=Student("venkat", "CSE", "Big Data", "BIT")
s1.detailes()

venkatlv-gr
Автор

Really good channel please upload more videos in other languages
other programming related Computer science

nevinarushan
Автор

mam please upload more video i want to see you more in my field🌹😎

randomfactz
Автор

Thanks for intelligence technic, it, s becoming absorbing 💕💕💕💕💕

chamara
Автор

Try this one
class University():
def __init__(self, uni_name):
self.uni_name = uni_name
def display(self):
print(f'university name is {self.uni_name}')

class Course(University):
def __init__(self, uni_name, course_name):
University.__init__(self, uni_name)
self.course_name = course_name
def display(self):
print(f'Course name is {self.course_name}')

class Branch(University):
def __init__(self, uni_name, branch):
University.__init__(self, uni_name)
self.branch = branch
def display(self):
print(f'Branch name is { self.branch} ')

class Student(Course, Branch):
def __init__(self, uni_name, course_name, branch):
Course.__init__(self, uni_name, course_name)
Branch.__init__(self, uni_name, branch)
def display(self):
print('I am Student')

class Faculty(Branch):
def __init__(self, uni_name, branch):
Branch.__init__(self, branch)
def display(self):
print('I am from Faculty')
u1 = University('JNTUH')
c1 = Course('JNTUH', 'BTECH')
b1 = Branch('JNTUH', 'CSE')
student_1 = Student('JNTUH', 'BTECH', 'CSE')
student_1.display()
University.display(student_1)
Course.display(student_1)
Branch.display(student_1)

RKBOSS-
Автор

Mam I have an one error. Please help me to solve error. I tried to my but cannot solve this error

ECSAMYAYYAS
Автор

Please make a tutorial video to add external libraries, just like numpy etc....

saqibathar
Автор

Mam Am getting a error can you resolve this.
class University:
def __init__(self, uname):
self.uname=uname
def showDetails(self):
print(f"university name: {self.uname}")
class Course(University):
def __init__(self, cname, uname):
super().__init__(uname)
self.cname=cname
def showDetails(self):
print(f"coursename is {self.cname}, university name is {self.uname}")
class Branch(University):
def __init__(self, Bname, uname):
super().__init__(uname)
self.Bname=Bname
def showDetails(self):
print(f"Branch name is {self.Bname}, university name is {self.uname}")
class student(Course, Branch):
def __init__(self, name, Bname, cname, uname):
Course.__init__(self, cname, uname)
Branch.__init__(self, Bname, uname)
self.name=name
def showDetails(self):
print(f"I am {self.name}, am a student in {self.uname} in the course of {self.cname} and Branch is {self.Bname}")
class Faculty(Branch):
def __init__(self, name, Bname, uname):
Branch.__init__(self, Bname, uname)
self.name=name
def showDetails(self):
print(f"faculty name is {self.name}, Branch is {self.Bname}, in {self.uname} university")

u1=University("JNTUH")
u1.showDetails()

c1=Course("python", "JNTUH")
c1.showDetails()

b1=Branch("Engineering", "JNTUH")
b1.showDetails()

s1=student("Ram", "Engineering", "python", "JNTUH")
s1.showDetails()

f1=Faculty("Suresh", "Engineering", "JNTUH")
f1.showDetails()

nageshdeva
Автор

hello mam,
how you make.def, if in italic fonts, plz tell

sapmmonlinetutorial
Автор

Hello mam can you please solve this problem it still gives an error

class University:
#uni_name means university_name
def __init__(self, uni_name):
self.uni_name = uni_name

def showDeatails(self):
print(f"Hello! this is {self.uni_name}.")

class Branch(University):

def __init__(self, uni_name, branch):
super().__init__(uni_name)
self.branch = branch

def showDeatails(self):
super().showDeatails()
print(f"This is the {self.branch} of {self.uni_name}.")

class Course(University):

def __init__(self, uni_name, course):
super().__init__(uni_name)
self.course = course

def showDeatails(self):
super().showDeatails()
print(f"{self.uni_name} provides {self.course}")

class Student(Branch, Course):
def __init__(self, uni_name, branch, course, name):
Branch.__init__(self, uni_name, branch)
Course.__init__(self, uni_name, course)
self.name = name
def showDeatails(self):
print(f"Hello! this is me {self.name}")
Branch.showDeatails(self)
print(f"{self.uni_name} provides {self.course} course.")

uni = Student("UET", "Peshawar", "Python Programming", "Zaid Ahmad")
uni.showDeatails()

ZaidAhmad-js
Автор

Students are so Bad . Chee! Itne gande comments bhej rahe kuch bacche . In logon s bacche banke nahi raha jaata???

g
Автор

Please, ma'am, upload two videos.

Manoj_Singh
Автор

mam aap hamare college m aaiyee m apni degree extend kr dunga
💋💋💋💋💋💋

randomfactz
Автор

You have nothing to do with this lecture but you are still here😂

saipranav