#60 Python Tutorial for Beginners | Method Overloading and Method Overriding

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น • 275

  • @varunkrishnaKyathanpally
    @varunkrishnaKyathanpally 5 ปีที่แล้ว +138

    I will never forget about Method overriding in my life. Thank you:)

  • @giuseppepala8668
    @giuseppepala8668 5 ปีที่แล้ว +192

    "My phone overrides my father's phone"
    Simply brilliant!

    • @Raja-tt4ll
      @Raja-tt4ll 5 ปีที่แล้ว

      Yes!

    • @parth_149
      @parth_149 4 ปีที่แล้ว

      That was a very good example.

  • @zakiasmaa6834
    @zakiasmaa6834 4 หลายเดือนก่อน +4

    "My phone overrides my father's phone", Thank you for being such a wonderful teacher and for sharing your knowledge with the world. I'm looking forward to continuing to learn from you!

  • @lokeshkatikireddi1924
    @lokeshkatikireddi1924 4 ปีที่แล้ว +6

    This guy has answer for any question. Awesome work Navin Reddy...

  • @prashanthmj4907
    @prashanthmj4907 4 ปีที่แล้ว +4

    Navin, this quick-learn course is awesome...I have been in the industry for 34+ years and decided to learn Python. I did not want to go to 3-6-9 month course and was looking for a quick overview. Excellent work. Keep it up. I have been programming since 1984 and have used almost all languages and platforms....OMG - there are so many things to remember to accomplish this smart programming using Python. I hope "Go" is not further difficult to learn....

  • @sonofzues8414
    @sonofzues8414 5 ปีที่แล้ว +5

    i Am watching your videos from years, just know your methods are simpler for beginners. and for everyone keep it up.

  • @vishnukumarpaswan9053
    @vishnukumarpaswan9053 4 ปีที่แล้ว +9

    The eg.was just remarkable.
    The effort u put to make us understand is just insane.
    Salute to sir.

  • @tirthpatel7388
    @tirthpatel7388 4 ปีที่แล้ว +14

    The Way You Explain Every Concept With a Lovely Example Makes Learning Python So Easy. Thanks Navin Sir❤️❤️❤️.

  • @inderkaur3012
    @inderkaur3012 2 ปีที่แล้ว +2

    Was unable to understand the concept of Method Overriding. But the way you taught this concept, was amazing. Great job!

  • @niveditaaaaaa
    @niveditaaaaaa 2 ปีที่แล้ว +3

    i would have NEVER understood this topic in my university. you made it so simple!!

  • @abhishekabhi732
    @abhishekabhi732 4 ปีที่แล้ว +6

    sir very good example you had taken
    "i understand the concept perfectly now"
    thank u for this

  • @amithsuryat1454
    @amithsuryat1454 2 ปีที่แล้ว +2

    Awesome class sir... brilliant teaching... I never forget about Method overriding in my life...
    🙏

  • @sudiptamondal5182
    @sudiptamondal5182 ปีที่แล้ว

    Sir I am from humanities background and currently working as a professional Interior Designer. I am 31years old and recently my partner suggested me to have a look into your videos when I told her I want to learn Python. I have no prior knowledge of coding or anything but after seeing and watching your videos I must say I am in love with the way you teach. If I can ever switch my career from being a designer to a developer of coder, I would thank you from the core of my heart. I am learning so much from you. Thank you once again.

  • @chiragukey7283
    @chiragukey7283 4 ปีที่แล้ว +2

    for method overloading using variable length method
    class student:
    def sum(self, a, *b):
    s = a
    for e in b:
    s = s+e
    return s
    s1 = student()
    print(s1.sum(4, 5, 6))

  • @janardan3210
    @janardan3210 4 ปีที่แล้ว +2

    The best example of method overriding.. I will remember it definately

  • @legendworldclass8832
    @legendworldclass8832 หลายเดือนก่อน

    After 3 years when I am now going for job interviews & tests , still watching your playlist to refresh up, Kudos to you Sir

  • @kisantimsinacoverz9744
    @kisantimsinacoverz9744 5 ปีที่แล้ว +9

    Hey Telesko! I love the way you give examples :-)I m 18 years old and I m learning python through your videos /////thank you very much for making this python series:-);-) I love you a lot for teaching me python

  • @AudeJavel12
    @AudeJavel12 4 ปีที่แล้ว +3

    min 5:40 , def sum(self, a=None, b=None, c=None): , i use (self,a=0,b=0,c=0): , and then we dont need to use "if a != None" etc conditions. 3 lines of code instead of 6 =))

  • @tonyreddy6897
    @tonyreddy6897 3 ปีที่แล้ว +3

    At 6:15 for method overloading, it would be better to pass 0 than None as we can skip that if condition.

    • @versatile7713
      @versatile7713 2 ปีที่แล้ว +1

      What if you pass strings as arguments

  • @gandamraviteja7019
    @gandamraviteja7019 4 ปีที่แล้ว

    awesome sir none of my teachers or google haven't explained this concept like this.... u are simply awesome sir.....

  • @vivek3861
    @vivek3861 6 ปีที่แล้ว

    The only content which is alive. Sir you don't have to worry about uploading videos faster, take your time. I know how much it takes to make a content like this. Thanks for your amazing content. It is very unique and not much complicated.

  • @kaustavpaul9306
    @kaustavpaul9306 2 ปีที่แล้ว

    This phone example was the best which I got in this topic all over the internet. ✅ ❤️ Explained

  • @mahendrashah9810
    @mahendrashah9810 5 ปีที่แล้ว +1

    what a explaining sir.....!
    who are dislike the
    Videos understanding very well and teaching is awesomeeee

  • @mr.strange7002
    @mr.strange7002 ปีที่แล้ว

    That's a great example i never forget overriding and inheritance from now thanks a lot 👍

  • @narangparth
    @narangparth 4 ปีที่แล้ว +3

    As per me, the better option for method overloading would be:
    class A:
    def sum(self,*a):
    c=0
    for i in a:
    c=c+i
    return c
    a = A()
    print(a.sum(10,20,30,40))

  • @PhoenixRisingFromAshes471
    @PhoenixRisingFromAshes471 6 ปีที่แล้ว +5

    Sir your content is very very good .Although you take some time to post a video but the quality that we get is very good which compensates everything.Sir we can even wait for a year if the content is good so sir take some time and keep on posting such awesome videos on python because you are our only source of knowledge. :)

  • @Rafi-nc3nw
    @Rafi-nc3nw 3 ปีที่แล้ว

    Sir is world's number 1 teacher. No doubt on this. 🤗🤗

  • @subhayanmajumder2756
    @subhayanmajumder2756 3 ปีที่แล้ว +2

    "Method Overriding " love u sir,u r god

  • @fireworks6795
    @fireworks6795 5 ปีที่แล้ว +1

    it is a very good idea to have tutorial for practices, in which after watching tutorial of the concept we can learn better via practices. thank you

  • @harshnathjha1458
    @harshnathjha1458 3 ปีที่แล้ว +1

    Another day of thanking God for tutors like you who I owe my engineering degree to.

  • @bijenadhikari
    @bijenadhikari 4 ปีที่แล้ว +1

    i think i will not forget this overriding concept . thanks man.

  • @smritiraj4309
    @smritiraj4309 3 ปีที่แล้ว

    that example clears all of my doubts about over riding topic.

  • @SureshAkkavarapu
    @SureshAkkavarapu ปีที่แล้ว

    Kudos🤩 , his explanation of standards and quality is awesome ....phone overrides ex is unique & top notch

  • @synthiapyre5618
    @synthiapyre5618 4 ปีที่แล้ว +15

    "I was not having a phone.", sounds so Shakespearean.

  • @Daniel-om8wm
    @Daniel-om8wm 6 ปีที่แล้ว +1

    Every one of your videos will have 100k views soon. You rock bro.

  • @ROHIT-gv7xk
    @ROHIT-gv7xk 5 ปีที่แล้ว +6

    good explanation of method overriding

  • @sampathkumar5699
    @sampathkumar5699 3 ปีที่แล้ว +1

    Overriding example is superb

  • @adityaroy6901
    @adityaroy6901 4 ปีที่แล้ว +3

    class Student:
    def sum(self, *b):
    c = 0
    for x in b:
    c += x
    return c
    s1 = Student()
    print(s1.sum(5, 6, 5, 4))
    can we use this for method overloading?

  • @vinaymt6426
    @vinaymt6426 5 ปีที่แล้ว +1

    Story to explain method overriding is superb❤️

  • @sumukhyr5954
    @sumukhyr5954 5 ปีที่แล้ว +12

    Sir instead of assigning None to a , b , c variable in sum method , we can assign it to zero . So that we no need to check the None value of the arguments.

  • @shavakchauhan342
    @shavakchauhan342 4 ปีที่แล้ว

    The father example for method overiding was a brilliant example!!!

  • @LittleGroot
    @LittleGroot 5 ปีที่แล้ว +1

    Sir you are the best your teaching skill is fantabulous keep it up.

  • @rivalkido1162
    @rivalkido1162 4 ปีที่แล้ว +2

    6:07 you don't need that lengthy code just set default values of a, b, c as 0

  • @NewbieInForeignLand
    @NewbieInForeignLand 5 ปีที่แล้ว +2

    Awesome videos sir 👌👌 & it's fun watching your videos while going to office daily. I never get bored & it's really very easy to recall all the concepts the way you explain them. Hats off to you. I loved the example you gave Nokia & Motorola 😃😄 Keep going sir 😄

  • @pratikrout1400
    @pratikrout1400 4 ปีที่แล้ว

    you are a great teacher Naveen sir thanks for teaching us python for free. i was going to buy a book to learn python but when i started watching your videos i thought that i dont need one

  • @sayf8277
    @sayf8277 3 ปีที่แล้ว +1

    That father son example is just wow 🔥

  • @prashantsharma2291
    @prashantsharma2291 6 ปีที่แล้ว +1

    Such a hardworker you are Sir!

  • @pathansalman7349
    @pathansalman7349 ปีที่แล้ว

    Your explanation is easy to understand for everyone

  • @slonbeskonechen8310
    @slonbeskonechen8310 3 ปีที่แล้ว +1

    Great explanation! Thank you!

  • @medley5670
    @medley5670 3 ปีที่แล้ว

    Wooow... U explained the function overriding sooo well😀

  • @sharathtenugolu5973
    @sharathtenugolu5973 5 ปีที่แล้ว +3

    Nice and easy explanation. Thank you so much. :)

  • @harsiddhisinghdev4650
    @harsiddhisinghdev4650 6 ปีที่แล้ว +6

    Thanks sir please daily upload a video 🚴🚴

  • @Sahilsharma-xs4mv
    @Sahilsharma-xs4mv 6 ปีที่แล้ว

    This is a one of quality contents of sir ......you are awesome sir
    Everyone sees that this video didn't have any dislike s

  • @dattukoralli1708
    @dattukoralli1708 4 ปีที่แล้ว +1

    instead of (self,a=None,b=None,c=None) we can (self,a=0,b=0,c=0) to avoide conditions

  • @Maks05N
    @Maks05N 4 ปีที่แล้ว +2

    you made me emotional i remembered my old days

  • @shrishtigarg4674
    @shrishtigarg4674 ปีที่แล้ว

    your teaching is best sir thank you for such content.😀

  • @giorgi23
    @giorgi23 5 ปีที่แล้ว

    Great explanation. Note: if a != None: s += a; if b != None: s += b; if c != None: s += c; )))

  • @avinash7154
    @avinash7154 5 ปีที่แล้ว

    awesome example clearly understand that over riding guru navin

  • @nsailasya1955
    @nsailasya1955 ปีที่แล้ว

    That was such a cool example...got the concept just like that

  • @FacadeModelingByPayam-eu4pd
    @FacadeModelingByPayam-eu4pd 2 วันที่ผ่านมา

    your videos are very good i forgot to like it :D now i liked all of it

  • @yogeerao9149
    @yogeerao9149 2 ปีที่แล้ว

    I am become fan of your phone example with Method Overriding

  • @joyhalder4640
    @joyhalder4640 2 ปีที่แล้ว

    Really sir your every class is so helpful for me.

  • @OASEBAK
    @OASEBAK 4 ปีที่แล้ว

    crystal clear explanation for method overriding

  • @sweetreddy21
    @sweetreddy21 4 ปีที่แล้ว

    Your are a wolf in the teaching field.

  • @pawnage3
    @pawnage3 3 ปีที่แล้ว

    Thank you Mr. Reddy! I really appreciate it.

  • @pavanjain2178
    @pavanjain2178 6 ปีที่แล้ว +1

    Enjoying this session very much sir😊😊😊

  • @preyaspatel3656
    @preyaspatel3656 6 ปีที่แล้ว +1

    Sir, You are really great in teaching.... Thank you😊😊

  • @pavankumarchingepally5884
    @pavankumarchingepally5884 ปีที่แล้ว

    Thank you for your valuable contribution, Sir.

  • @anujdahiya341
    @anujdahiya341 5 ปีที่แล้ว

    Method overriding also works in same class:
    class A:
    def add(self,a,b):
    return a + b
    def add(self,a,b,c):
    return a + b + c
    A1 = A()
    print(A1.add(10,20))
    --------------------this will give an error
    print(A1.add(10,20,30))--------------this will give 60-------
    first definition of add() takes self + two arguments but
    second definition of add takes self + 3 arguments.. so second definition overrides first definition of first add() method

  • @gracevella9921
    @gracevella9921 4 ปีที่แล้ว

    Excellent use of example - easy to understand! Thank you

  • @vaibhavidharne4618
    @vaibhavidharne4618 2 ปีที่แล้ว

    sir you explain in a such nice way!! thank you!!

  • @anandiborade6349
    @anandiborade6349 4 ปีที่แล้ว

    I will never forget method overriding in my life!!

  • @bhavikjinjala980
    @bhavikjinjala980 4 ปีที่แล้ว +1

    Very nice Explanation ✌️

  • @rohrakhushi
    @rohrakhushi 8 หลายเดือนก่อน

    You are an amazing amazing teacher!

  • @ManideepGoudNimmala
    @ManideepGoudNimmala 5 ปีที่แล้ว

    Well its a simple and a good example for method overriding and thanks for the python course videos

  • @saudzubedi
    @saudzubedi 3 ปีที่แล้ว

    OMG that was the best example, I've ever heard

  • @RohitSharma-cd5bs
    @RohitSharma-cd5bs 4 ปีที่แล้ว

    Op example sir, hats off to you sir ❤💕❤💕❤

  • @mubarizmirzayev35
    @mubarizmirzayev35 5 ปีที่แล้ว +1

    Good video, but i would not write that func. like that def sum(self, a=None, b=None ... ) What if we have more than 4 variables. I would write that function like this:
    def sum(self, *args):
    s = 0
    for a in args:
    s += a
    return s
    Thanks again

  • @khushichaudharysart275
    @khushichaudharysart275 6 ปีที่แล้ว +2

    Sir please make a video series on different modules of Python

  • @gadapasaikrupa9998
    @gadapasaikrupa9998 3 ปีที่แล้ว

    boss really fantastic father and son story.love u

  • @AyushSharma-be4kh
    @AyushSharma-be4kh 4 ปีที่แล้ว

    Definition of Perfect..!

  • @DhimanLab
    @DhimanLab 4 ปีที่แล้ว +1

    Nicely Explained :) ...but I have a doubt here
    what is the difference between duck typing and method overriding

  • @sasichandramorukurthi5868
    @sasichandramorukurthi5868 5 ปีที่แล้ว +1

    we can put by default zero to sum method instead of none its working fine zero also

  • @Laith.Alkhazragy
    @Laith.Alkhazragy 4 ปีที่แล้ว

    for the one how dont konw this method
    class student:
    def __init__(self,m1,m2):
    self.m1 = m1
    self.m2 = m2
    def sum(self,*a):
    return sum(a)
    s1 = student(58,69)
    print(s1.sum(5,6))

  • @hetpatel7918
    @hetpatel7918 4 ปีที่แล้ว

    very concise
    find me a better teacher than him, I will wait.

  • @Kushagra123-y7e
    @Kushagra123-y7e 3 ปีที่แล้ว

    thank you very much
    i understand everything from you

  • @sunnytawar7020
    @sunnytawar7020 4 ปีที่แล้ว +1

    Sir will you please make videos on data structure with python..

  • @supunsoorath9740
    @supunsoorath9740 ปีที่แล้ว

    Clear Explanation❤️

  • @patteboyinadharani1702
    @patteboyinadharani1702 4 ปีที่แล้ว

    👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌.. Super explanation sir.....

  • @Dhananjoybhatta123
    @Dhananjoybhatta123 4 ปีที่แล้ว

    Awesome concept. Seriously sir, you teach in a great way. I will be looking for your next videos to understand the usage of this concept in depth.

  • @abhijitmali6837
    @abhijitmali6837 2 ปีที่แล้ว

    Thank you sir for this concept very nicely explain

  • @sagarrao79
    @sagarrao79 5 ปีที่แล้ว

    we ca define sum like below also
    def sum(self,a=0,b=0,c=0):
    return a+b+c

  • @sadhanalav4385
    @sadhanalav4385 ปีที่แล้ว

    Yes default arguments will replace if any arguments missed at position..

  • @akashanandh5633
    @akashanandh5633 3 ปีที่แล้ว +1

    We are learning python from you, where you learnt it from?

  • @debrajbanik4302
    @debrajbanik4302 4 ปีที่แล้ว +1

    Awesome Example!!

    • @debrajbanik4302
      @debrajbanik4302 4 ปีที่แล้ว +1

      Thanks For The Comment From Telusko's Side

  • @chejarlavineela3152
    @chejarlavineela3152 5 ปีที่แล้ว +1

    Good explanation sir

  • @mdnaiyerahmed8328
    @mdnaiyerahmed8328 4 ปีที่แล้ว

    I think, its more simple method overloading progrm :
    def sum(a=0,b=0,c=0):
    s=a+b+c
    print(s)

  • @narangparth
    @narangparth 4 ปีที่แล้ว

    Hi Navin,
    I work in NIIT Technologies and in my project, we don't use python.
    I've gone through your videos (till this point), and I'm making my notes as well.
    But I've noticed that I tend to forget what was taught in previous videos. So, have to jump back and forth.
    If python was used in our project, then, it would have helped me to practice.
    But for now, apart from the small assignments, I have nothing much to practice on.
    Can you please suggest what my next step should be? So, I keep on practicing.
    Regards,
    Parth Narang

  • @pawansoni4296
    @pawansoni4296 4 ปีที่แล้ว +1

    Dear Sir, Thank you for your efforts and teaching. I have very good learning by your videos. One query I have, In this video in OverLoading part, Where you have used example of NONE for a,b,c. I tried with '0' instead of None and it saved if,elif and else code and Results were same as you have shown.
    It this method with '0" will work fine, or this NONE can be used in diff scenario? Let me know your view point.

  • @TheSKpositiveVibrations12
    @TheSKpositiveVibrations12 8 หลายเดือนก่อน

    Thsnk you sir for ur beautiful explanation