Python inheritance 👪

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 200

  • @BroCodez
    @BroCodez  3 роки тому +39

    Don't forget to SMASH that LIKE button and
    DROP a random COMMENT down below for the YT algorithm
    🙏
    also here's the code from the video...
    class Animal:
    alive = True
    def eat(self):
    print("This animal is eating")
    def sleep(self):
    print("This animal is sleeping")
    class Rabbit(Animal):
    def run(self):
    print("This rabbit is running")
    class Fish(Animal):
    def swim(self):
    print("This fish is swimming")
    class Hawk(Animal):
    def fly(self):
    print("This hawk is flying")
    rabbit = Rabbit()
    fish = Fish()
    hawk = Hawk()
    print(rabbit.alive)
    fish.eat()
    hawk.sleep()
    rabbit.run()
    fish.swim()
    hawk.fly()

    • @ManuelRincon-w7z
      @ManuelRincon-w7z 9 місяців тому

      Is this info available in the full phyton course?

  • @incognito3923
    @incognito3923 2 роки тому +60

    i watched like 3 videos read 2 books about inheritance listened 1 lecture and learnt nothing. then you came up with 7 minute video and just put knowledge in my brain

    • @medooo80
      @medooo80 Рік тому +3

      Same for me. I watched python for everybody and didn't learn shit. And this just explained it well. 😂

  • @cameron7957
    @cameron7957 3 роки тому +44

    You have no idea how well you just described this. Thank you, much needed.

  • @ronbelanger8812
    @ronbelanger8812 2 роки тому +15

    This is the best programming series I have ever seen. You have a great gift for teaching.

  • @DucTaZenSurfer
    @DucTaZenSurfer 3 роки тому +24

    Whoa, how on earth can you make me understand inheritance in a 7-minute video but my class of 7 lecture videos couldn't?! lol Good-looking Bro, I always refer to you for learning and in a rut in school during my Python phase. Now we're moving into Phase 2 with Django and Full Dev Stack stuff!

  • @thalesaragao8634
    @thalesaragao8634 2 роки тому +2

    Extremely easy and useful tutorial. I am studying django and a lot of things are just making sense now! Great Content!

  • @tara2337
    @tara2337 6 місяців тому +1

    what you do is not teaching, it's more like magic you rock!

  • @sattamassagan290
    @sattamassagan290 2 місяці тому

    Nice, thanks. So we would only initialise if we wanted to list attributes, but because we were focused on methods we didn't have to?

  • @snoopy962
    @snoopy962 7 місяців тому +1

    Easily and clearly explained. Thanks :)

  • @cameronestrada1430
    @cameronestrada1430 Рік тому

    this is the only tutorial that has actually made me understand class inheritance. thank you so much! subscribed 👓

  • @HANNAHGRANT-b4u
    @HANNAHGRANT-b4u Місяць тому

    Thank you! A teacher learning python and this is a great example

  • @artyomashigov
    @artyomashigov 7 місяців тому

    I have subscribed, smashed the like button and leaving this in the comment)
    Great explanation

  • @hari3658
    @hari3658 Рік тому

    My head was exploding figuring out this whole inheritance problem, thank you so much for being a big brother and saving me.!😭😭

  • @utkarshpateriya1564
    @utkarshpateriya1564 9 місяців тому

    Thanks for explaining things in an easy way. Very helpful. Liked and Subscribed

  • @franciscobarrientos3922
    @franciscobarrientos3922 Місяць тому

    Hi, thanks a lot! very well explained!!
    may I ask:
    what is the difference between using or not using:
    " def __init__(self):
    super().__init__()"
    other sources teach to use that, but from seeing this video it seems to me that is not necessary.
    Thanks!

  • @rbtravassos
    @rbtravassos 2 місяці тому

    Very well explained. Thanks ❤

  • @sarakopser6596
    @sarakopser6596 Рік тому

    Going to school for Cyber Security Management and taking a program class! Professor put this video in resources. I will def save and come back! Thank you for explaining this!

  • @gregoriolobato3033
    @gregoriolobato3033 Рік тому

    I saw 44 seconds and instant thumb up. Im gonna suscribe.

  • @talhaomair1455
    @talhaomair1455 10 місяців тому +1

    This is more useful than the semester worth classes.

  • @aydinakbuga
    @aydinakbuga Рік тому

    Easy, simple and pratic
    Thanks bro

  • @elimoshebogomilsky4592
    @elimoshebogomilsky4592 Рік тому

    wow this is so helpful. amazing ability to describe

  • @samisado6331
    @samisado6331 10 місяців тому

    Thank you so much for the wonderful explanation

  • @shamaeelahmed3561
    @shamaeelahmed3561 2 роки тому

    Bro, you're the best programming mentor on earth
    Love you

  • @badhonbiswas3751
    @badhonbiswas3751 3 роки тому +1

    After watching your opp video i understand the Opp concept

  • @HannaBerhanu-dj4kz
    @HannaBerhanu-dj4kz 4 місяці тому

    The best lesson ever and you got all the 3 things (like, comment, and Sub)!

  • @visionlanguages1999
    @visionlanguages1999 8 місяців тому

    you are the best bro!!! I was in serious trouble. You made my day!! Blessings!

  • @Michaelthegrape7680
    @Michaelthegrape7680 3 місяці тому

    That was actually helpful, thanks!

  • @ameetfaisal8723
    @ameetfaisal8723 Рік тому

    Awesome video. And also commenting for the algorithm.

  • @АлексейСугоняко
    @АлексейСугоняко 8 місяців тому

    Great tutorial. Enjoy it very much.

  • @bu1216
    @bu1216 2 роки тому

    Bro Code is King 👑 of Teaching Programming 👑

  • @istein654
    @istein654 9 місяців тому

    -thank you for this clear explanation!

  • @raidenx_knights1026
    @raidenx_knights1026 7 місяців тому

    This was extremely helpful, thank you

  • @kingshahzad78
    @kingshahzad78 Місяць тому

    Great Explanations Sir

  • @NeoWaiTengTildaTemasekjc
    @NeoWaiTengTildaTemasekjc 3 місяці тому

    i hope you are making lots of money through advertisements, cos you are helping us computing students a lot!!

  • @nerdyberi
    @nerdyberi 7 місяців тому

    Very helpful i understood immediately

  • @kelvinneiva6635
    @kelvinneiva6635 Рік тому

    vc é o brabo, Brasil aqui!!

  • @centralcodingethiopia
    @centralcodingethiopia Рік тому

    Short, brief and to the point.

  • @knownrobloxian3381
    @knownrobloxian3381 2 роки тому +1

    inheritance seems very helpful

  • @davidserrano134
    @davidserrano134 2 роки тому

    I think I found my favorite python channel

  • @ninjastar4187
    @ninjastar4187 Рік тому

    Smashed 👍🏽and Subscribed ✍🏽 I was going to give up. You broke it down perfectly . Thank you. I'm so grateful.

  • @bekhacker
    @bekhacker Рік тому +1

    Best explanation ever❤

  • @e-commerceassist4891
    @e-commerceassist4891 Рік тому

    I like the concept you taught thanks 🙏

  • @Vincent-y3c
    @Vincent-y3c 6 місяців тому

    You describe this so well

  • @DROR19801
    @DROR19801 Рік тому

    thank you for this awesome tutorial bro code!

  • @xolelwamabutya-fn2xb
    @xolelwamabutya-fn2xb Рік тому

    i was so confused about this topic but now i understand better , thank you !!

    • @zamanincube1368
      @zamanincube1368 6 місяців тому

      Uhlalaphi sisi mhlawumbe singancedana

  • @lahengsiri4686
    @lahengsiri4686 2 роки тому

    Very clear, very helpfull. Thank you.

  • @omarosman5915
    @omarosman5915 7 місяців тому

    bro code is the TRUE BRO 🙌🙌

  • @jackkuelmazierlham
    @jackkuelmazierlham 8 місяців тому

    simple explanation, keep it bro

  • @PotatoNachoIT
    @PotatoNachoIT Рік тому

    yep defenitly helped thnx rlly man u help a lot of pple

  • @happytyagi7122
    @happytyagi7122 3 місяці тому +1

    Nice 👍

  • @trshkohamirza1621
    @trshkohamirza1621 3 місяці тому

    Awesome thank you

  • @cristiucvladimir7909
    @cristiucvladimir7909 5 місяців тому

    Thanks for the content.

  • @davehug
    @davehug 3 роки тому +1

    Also thank you for all your work

  • @RobinsonOkusala
    @RobinsonOkusala 10 місяців тому

    I like the teaching method

  • @gustavoaponte1814
    @gustavoaponte1814 Рік тому

    This series is super duper good :3

  • @techlace1195
    @techlace1195 2 роки тому

    thanks for super easy explanation bro!

  • @RealRadaiZabala
    @RealRadaiZabala Рік тому

    Thank you, @Bro Code

  • @АлексейМиронов-х3о5щ

    Helpful

  • @marcelobour
    @marcelobour Рік тому

    neat as fish+duck!

  • @sgsod
    @sgsod 6 місяців тому

    They should have links to your videos in the tutorials

  • @enochcrosby6630
    @enochcrosby6630 3 роки тому

    Comment for the algo. Good video, man.

  • @09deekshith
    @09deekshith Рік тому

    Best tutorials 🔥🔥🔥🔥

  • @kamkam9600
    @kamkam9600 11 місяців тому +1

    Good vid

  • @MikeDC360
    @MikeDC360 9 місяців тому

    "Broding 101" keep it coming

  • @sirdave48
    @sirdave48 9 місяців тому

    Well explained!

  • @SkyperX97
    @SkyperX97 6 місяців тому

    Guys , don't forget to subscribe!
    I was learning from him for a while and I don't know how I forgot to subscribe, I though I did it ...
    Happy coding!

  • @rethikkrishna777
    @rethikkrishna777 4 місяці тому

    Bro you are awesome

  • @everythingtv6675
    @everythingtv6675 Рік тому

    The best way to explain😂

  • @XdCassy
    @XdCassy 2 роки тому

    U r way too underrated ty bto

  • @hishamdebis9490
    @hishamdebis9490 5 місяців тому

    awesome

  • @piotrkopcewicz5227
    @piotrkopcewicz5227 Рік тому

    it is good it is very good

  • @requa3314
    @requa3314 Місяць тому

    thank you so much

  • @lw9954
    @lw9954 2 роки тому

    Thanks for the video Bro

  • @imadiman528
    @imadiman528 Рік тому

    That's awesome

  • @mrrelaxingsounds6894
    @mrrelaxingsounds6894 Рік тому

    lovely vid broooooooooooo

  • @melanoberidze4995
    @melanoberidze4995 8 місяців тому

    great videoooooo

  • @kemann3815
    @kemann3815 2 роки тому

    Great

  • @vahramgrigoryan5204
    @vahramgrigoryan5204 3 роки тому +1

    I am confused about not using __init__ in this classes. Isn’t it necessary?

    • @TheMexart
      @TheMexart 2 роки тому

      No, because he didn't define any attribute.

  • @alsal1002
    @alsal1002 Рік тому

    Great Vid!!

  • @legitimatepsychiatricemerg1363

    super nice

  • @philippseis6893
    @philippseis6893 10 місяців тому

    Perfect, thanks

  • @juancharlie777
    @juancharlie777 8 місяців тому

    Appreciate you bro

  • @anikaitpratihary1222
    @anikaitpratihary1222 11 місяців тому

    Bro Lovely 🎉🎉🎉

  • @gagandwaz1158
    @gagandwaz1158 2 роки тому

    Awesome! Thanks

  • @mervesafak1508
    @mervesafak1508 9 місяців тому

    Perfect

  • @igordjokic
    @igordjokic Рік тому

    Thank You so much!

  • @usatheesh7779
    @usatheesh7779 4 місяці тому

    thank you

  • @ludwigvangogh4218
    @ludwigvangogh4218 6 місяців тому

    I wish I can inherit your bro-ness by watching these videos

  • @davehug
    @davehug 3 роки тому +1

    Is there anywhere to download these teaching my self and kid but not always with internet.

    • @knownrobloxian3381
      @knownrobloxian3381 2 роки тому +1

      You can go to a UA-cam downloader and download the video for offline use.

  • @shirinkhorchid5169
    @shirinkhorchid5169 7 місяців тому

    Thank you ❤

  • @Budu_Alexandru214
    @Budu_Alexandru214 Рік тому

    Nice video

  • @lodz1292
    @lodz1292 3 роки тому

    great! explanation

  • @mythicpulse-i9o
    @mythicpulse-i9o Рік тому

    I love your coding vids

  • @bekturasanbekov1979
    @bekturasanbekov1979 Рік тому

    thx 4 vid bro !

  • @YDSaleh
    @YDSaleh 2 місяці тому

    Thank you, you just saved me from 3+ boring oop study hours

  • @DavidGoggins-b5w
    @DavidGoggins-b5w Місяць тому

    Keep going o😎😎😎😎

  • @hiiexisthiiexist1284
    @hiiexisthiiexist1284 Рік тому

    nice video

  • @keemorg3997
    @keemorg3997 Рік тому

    Thanks Bro Code!

  • @Pursite
    @Pursite 9 місяців тому

    nice

  • @shortbynaveen
    @shortbynaveen Рік тому

    Amazing bro