Python inheritance 👪

Ғылым және технология

Python inheritance tutorial example explained
#python #inheritance #tutorial
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()
music credits 🎼 :
===========================================================
Up In My Jam (All Of A Sudden) by - Kubbi / kubbi
Creative Commons - Attribution-ShareAlike 3.0 Unported- CC BY-SA 3.0
Free Download / Stream: bit.ly/2JnDfCE
Music promoted by Audio Library • Up In My Jam (All Of A...
===========================================================

Пікірлер: 188

  • @BroCodez
    @BroCodez3 жыл бұрын

    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()

  • @user-he9ps4ns2z

    @user-he9ps4ns2z

    6 ай бұрын

    Is this info available in the full phyton course?

  • @cameron7957
    @cameron79572 жыл бұрын

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

  • @incognito3923
    @incognito39232 жыл бұрын

    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

    Жыл бұрын

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

  • @ronbelanger8812
    @ronbelanger88122 жыл бұрын

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

  • @DucTaZenSurfer
    @DucTaZenSurfer2 жыл бұрын

    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
    @thalesaragao86342 жыл бұрын

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

  • @cameronestrada1430
    @cameronestrada1430 Жыл бұрын

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

  • @artyomashigov384
    @artyomashigov3845 ай бұрын

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

  • @utkarshpateriya1564
    @utkarshpateriya15647 ай бұрын

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

  • @happytyagi7122
    @happytyagi712217 күн бұрын

    Nice 👍

  • @snoopy962
    @snoopy9625 ай бұрын

    Easily and clearly explained. Thanks :)

  • @hari3658
    @hari3658 Жыл бұрын

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

  • @elimoshebogomilsky4592
    @elimoshebogomilsky4592 Жыл бұрын

    wow this is so helpful. amazing ability to describe

  • @user-bj9nb7su4j
    @user-bj9nb7su4j6 ай бұрын

    Great tutorial. Enjoy it very much.

  • @bobthebuilder5434
    @bobthebuilder5434 Жыл бұрын

    Actually so good. You explained it in such simple words.

  • @visionlanguages1999
    @visionlanguages19995 ай бұрын

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

  • @Michaelthegrape7680
    @Michaelthegrape768025 күн бұрын

    That was actually helpful, thanks!

  • @shamaeelahmed3561
    @shamaeelahmed35612 жыл бұрын

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

  • @aydinakbuga
    @aydinakbuga Жыл бұрын

    Easy, simple and pratic Thanks bro

  • @lahengsiri4686
    @lahengsiri46862 жыл бұрын

    Very clear, very helpfull. Thank you.

  • @lotfiaouanouk1292
    @lotfiaouanouk12923 жыл бұрын

    great! explanation

  • @rbtravassos
    @rbtravassos12 күн бұрын

    Very well explained. Thanks ❤

  • @samisado6331
    @samisado63317 ай бұрын

    Thank you so much for the wonderful explanation

  • @gregoriolobato3033
    @gregoriolobato3033 Жыл бұрын

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

  • @DROR19801
    @DROR19801 Жыл бұрын

    thank you for this awesome tutorial bro code!

  • @ameetfaisal8723
    @ameetfaisal8723 Жыл бұрын

    Awesome video. And also commenting for the algorithm.

  • @e-commerceassist4891
    @e-commerceassist4891 Жыл бұрын

    I like the concept you taught thanks 🙏

  • @isabellesteinhauslin650
    @isabellesteinhauslin6506 ай бұрын

    -thank you for this clear explanation!

  • @davehug
    @davehug3 жыл бұрын

    Also thank you for all your work

  • @cristiucvladimir7909
    @cristiucvladimir79093 ай бұрын

    Thanks for the content.

  • @sirdave48
    @sirdave487 ай бұрын

    Well explained!

  • @trshkohamirza1621
    @trshkohamirza1621Ай бұрын

    Awesome thank you

  • @alsal1002
    @alsal1002 Жыл бұрын

    Great Vid!!

  • @sarakopser6596
    @sarakopser65969 ай бұрын

    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!

  • @centralcodingethiopia
    @centralcodingethiopia Жыл бұрын

    Short, brief and to the point.

  • @tara2337
    @tara23373 ай бұрын

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

  • @raidenx_knights1026
    @raidenx_knights10264 ай бұрын

    This was extremely helpful, thank you

  • @kelvinneiva6635
    @kelvinneiva6635 Жыл бұрын

    vc é o brabo, Brasil aqui!!

  • @techlace1195
    @techlace1195 Жыл бұрын

    thanks for super easy explanation bro!

  • @ninjastar4187
    @ninjastar4187 Жыл бұрын

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

  • @gagandwaz1158
    @gagandwaz11582 жыл бұрын

    Awesome! Thanks

  • @fynzer5421
    @fynzer54212 жыл бұрын

    very well explained

  • @marcelobour
    @marcelobour Жыл бұрын

    neat as fish+duck!

  • @lw9954
    @lw9954 Жыл бұрын

    Thanks for the video Bro

  • @mrrelaxingsounds6894
    @mrrelaxingsounds6894 Жыл бұрын

    lovely vid broooooooooooo

  • @bekhacker
    @bekhacker Жыл бұрын

    Best explanation ever❤

  • @nerdyberi
    @nerdyberi4 ай бұрын

    Very helpful i understood immediately

  • @jackkuelmazierlham
    @jackkuelmazierlham6 ай бұрын

    simple explanation, keep it bro

  • @rethikkrishna777
    @rethikkrishna7772 ай бұрын

    Bro you are awesome

  • @PotatoNachoIT
    @PotatoNachoIT11 ай бұрын

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

  • @Pradeepmalagi
    @Pradeepmalagi2 жыл бұрын

    Helpful !

  • @gustavoaponte1814
    @gustavoaponte1814 Жыл бұрын

    This series is super duper good :3

  • @melanoberidze4995
    @melanoberidze49955 ай бұрын

    great videoooooo

  • @knownrobloxian3381
    @knownrobloxian33812 жыл бұрын

    inheritance seems very helpful

  • @legitimatepsychiatricemerg1363
    @legitimatepsychiatricemerg1363 Жыл бұрын

    super nice

  • @kamkam9600
    @kamkam96009 ай бұрын

    Good vid

  • @yiorgoskatopodis
    @yiorgoskatopodis2 жыл бұрын

    Excellent Bro

  • @user-so1dh8et2l
    @user-so1dh8et2l Жыл бұрын

    Helpful

  • @bekturasanbekov1979
    @bekturasanbekov1979 Жыл бұрын

    thx 4 vid bro !

  • @shortbynaveen
    @shortbynaveen10 ай бұрын

    Amazing bro

  • @jesuisravi
    @jesuisravi2 жыл бұрын

    nice job.

  • @imadiman528
    @imadiman528 Жыл бұрын

    That's awesome

  • @09deekshith
    @09deekshith9 ай бұрын

    Best tutorials 🔥🔥🔥🔥

  • @anikaitpratihary1222
    @anikaitpratihary12228 ай бұрын

    Bro Lovely 🎉🎉🎉

  • @juancharlie777
    @juancharlie7775 ай бұрын

    Appreciate you bro

  • @huntercraft5674
    @huntercraft5674 Жыл бұрын

    nice!

  • @user-ip1fv3qy2w
    @user-ip1fv3qy2w3 ай бұрын

    You describe this so well

  • @beingzero7541
    @beingzero75412 жыл бұрын

    Wow!

  • @davidserrano134
    @davidserrano1342 жыл бұрын

    I think I found my favorite python channel

  • @talhaomair1455
    @talhaomair14557 ай бұрын

    This is more useful than the semester worth classes.

  • @kianooshezzatpanah958
    @kianooshezzatpanah95810 ай бұрын

    that was NICEE

  • @keemorg3997
    @keemorg399711 ай бұрын

    Thanks Bro Code!

  • @hiiexisthiiexist1284
    @hiiexisthiiexist1284 Жыл бұрын

    nice video

  • @enochcrosby6630
    @enochcrosby66302 жыл бұрын

    Comment for the algo. Good video, man.

  • @BruteStinky
    @BruteStinky9 ай бұрын

    awesome

  • @Budu_Alexandru214
    @Budu_Alexandru214 Жыл бұрын

    Nice video

  • @divinityinversace
    @divinityinversace Жыл бұрын

    this is so good

  • @igordjokic
    @igordjokic Жыл бұрын

    Thank You so much!

  • @philippseis6893
    @philippseis68937 ай бұрын

    Perfect, thanks

  • @user-ye2mt5xy7f
    @user-ye2mt5xy7f8 ай бұрын

    I like the teaching method

  • @Inte8ranD
    @Inte8ranD11 ай бұрын

    Thank you, @Bro Code

  • @Mex_Music
    @Mex_Music5 ай бұрын

    Thanks!

  • @mervesafak1508
    @mervesafak15086 ай бұрын

    Perfect

  • @aisyjeff95
    @aisyjeff952 жыл бұрын

    amazing

  • @kemann3815
    @kemann38152 жыл бұрын

    Great

  • @HannaBerhanu-dj4kz
    @HannaBerhanu-dj4kz2 ай бұрын

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

  • @bu1216
    @bu12162 жыл бұрын

    Bro Code is King 👑 of Teaching Programming 👑

  • @netomusic_br
    @netomusic_br3 жыл бұрын

    Awesome

  • @omarosman5915
    @omarosman59155 ай бұрын

    bro code is the TRUE BRO 🙌🙌

  • @XdCassy
    @XdCassy2 жыл бұрын

    U r way too underrated ty bto

  • @Pursite
    @Pursite7 ай бұрын

    nice

  • @xolelwamabutya-fn2xb
    @xolelwamabutya-fn2xb11 ай бұрын

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

  • @zamanincube1368

    @zamanincube1368

    3 ай бұрын

    Uhlalaphi sisi mhlawumbe singancedana

  • @TataQueen17
    @TataQueen172 жыл бұрын

    Thanks a lot Bro

  • @daylon907
    @daylon9073 ай бұрын

    thanks!

  • @piotrkopcewicz5227
    @piotrkopcewicz5227 Жыл бұрын

    it is good it is very good

  • @usatheesh7779
    @usatheesh77792 ай бұрын

    thank you

  • @sattamassagan290
    @sattamassagan2902 күн бұрын

    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?

  • @dagim6625
    @dagim66256 ай бұрын

    Thanks,bro

  • @tarikyassa1076
    @tarikyassa10763 жыл бұрын

    Thanks bro!

  • @shirinkhorchid5169
    @shirinkhorchid51694 ай бұрын

    Thank you ❤

Келесі