Object Oriented Programming with Python - Full Course for Beginners

Sdílet
Vložit
  • čas přidán 15. 05. 2024
  • Object Oriented Programming is an important concept in software development. In this complete tutorial, you will learn all about OOP and how to implement it using Python.
    💻 Code: github.com/jimdevops19/PythonOOP
    🔗 Tutorial referenced for a deeper explanation about __repr__: • Python Magic Methods |...
    ✏️ Course developed by Jim from JimShapedCoding. Check out his channel: / @jimshapedcoding
    ⭐️ Course Contents ⭐️
    ⌨️ (0:00:00) Getting Started with Classes
    ⌨️ (0:12:11) Constructor, _init_
    ⌨️ (0:50:35) Class vs Static Methods
    ⌨️ (1:13:22) Inheritance
    ⌨️ (1:30:14) Getters and Setters
    ⌨️ (1:51:00) OOP Principles
    🎉 Thanks to our Champion and Sponsor supporters:
    👾 Wong Voon jinq
    👾 hexploitation
    👾 Katia Moran
    👾 BlckPhantom
    👾 Nick Raker
    👾 Otis Morgan
    👾 DeezMaster
    👾 AppWrite
    --
    Learn to code for free and get a developer job: www.freecodecamp.org
    Read hundreds of articles on programming: freecodecamp.org/news

Komentáře • 1,2K

  • @jimshapedcoding
    @jimshapedcoding Před 2 lety +708

    Thanks a lot for posting this, FCC! ❤️

    • @mahirrahman4253
      @mahirrahman4253 Před 2 lety +12

      You are an amazing teacher, thankyou for teaching me flask your market app really helped me 🙏🏻

    • @flammabletfm3405
      @flammabletfm3405 Před 2 lety +4

      You are the amazing one.Thanks for the great course.

    • @thetagang6854
      @thetagang6854 Před 2 lety +11

      No, thank YOU!

    • @jimshapedcoding
      @jimshapedcoding Před 2 lety +1

      @@mahirrahman4253 Thanks a lot!

    • @jimshapedcoding
      @jimshapedcoding Před 2 lety

      @@flammabletfm3405 You are welcome!!

  • @hhbadarin
    @hhbadarin Před 2 lety +379

    Only today and after watching this tutorial I understand "self" in python!

  • @DennisChaves
    @DennisChaves Před 2 lety +535

    I'm only 20 minutes in and already several concepts that were blurry before are now crystal clear to me. Excellent video!

    • @hgm8337
      @hgm8337 Před 2 lety +26

      plus the benefit of being taught by Count Dracula's nephew

    • @joseluizdurigon8893
      @joseluizdurigon8893 Před rokem +1

      @@hgm8337 noooo way hahahahahahahaha

    • @k.o.o.p.a.
      @k.o.o.p.a. Před rokem

      @@hgm8337 😭😭

    • @cjhoffmn
      @cjhoffmn Před rokem +4

      No joke - he's explained things in the first 20 mins that I've never heard anywhere else - yet they are true fundamentals that are really helpful to learn!

  • @shyamsundarraghu4667
    @shyamsundarraghu4667 Před 5 měsíci +29

    00:04 Understanding object oriented programming is important for software developers.
    07:57 Creating a method to calculate the total price of items
    23:21 Understanding constructors and best practices in classes
    31:11 Learned about constructor and working with different attributes
    45:44 Using a for loop, we can print the names of all instances
    53:38 Read CSV file and instantiate objects with class method.
    1:09:32 Create a separate class named 'Phone' that inherits from the 'Item' class
    1:17:02 Inheritance allows creating child classes that inherit attributes and methods from parent classes.
    1:31:54 Create read-only attributes in Python using the property decorator
    1:39:20 By adding double underscores to attribute names, access to those attributes is prevented outside of the class.
    1:54:40 Encapsulation and abstraction principles are applied in object-oriented programming.
    2:03:06 Inheritance allows code reuse across classes

  • @itishasan
    @itishasan Před rokem +302

    For those who didn't understand the static method, def is_integer(num) = Our Function & num.is_integer = Built-in Function. is_integer() is a popular built-in function that checks if a floating number is actually an integer. As an example, 7.0.is_integer() will return True whereas 7.3.is_integer() will return False. So as to avoid confusion, let's just change Our Function name to def check_integer(num) 🙂✌

    • @cerealnotfound
      @cerealnotfound Před rokem +2

      Thank you sir!!

    • @tg8799
      @tg8799 Před rokem +9

      I was scratching my head over this so much... all logic was flying out of my brain! Thank God for a helpful community! Thank you!

    • @tg8799
      @tg8799 Před rokem +11

      This comment needs to get pinned or something for newcomers

    • @midhunskani
      @midhunskani Před rokem +3

      Yup u cant name a function with a built in function name

    • @Omar-jn8xk
      @Omar-jn8xk Před rokem

      Thx

  • @FreihEitner
    @FreihEitner Před rokem +93

    I'm only up to the 45 minute point so far, but already I am very grateful for this tutorial. Thank you so much!

  • @muntaface
    @muntaface Před 2 lety +50

    This guy is amazing. He has taught me Selenium, Classes and I'm sure many more things in the future. Keep up the good work Jim, you're a beast!

  • @SuperTenja
    @SuperTenja Před 2 lety +81

    Just completed the whole video and this is hands down the best object oriented programming course I've ever come across. I've been trying to understand what exactly OOP is all these days by reading blogs and going through different tutorials. Nothing gave me as much clarity as this video did. Thanks a lot for the great work and for giving this out for free!

  • @ducdao1679
    @ducdao1679 Před 2 lety +13

    I've been learning and coding Python for a little over a year and have never fully understood the __init__ method until I saw this video. You rock!

  • @calfolkionized
    @calfolkionized Před 2 lety +154

    I find myself especially loving the structure of this OOP tutorial, it comes from a Funtional programming aspect and gradually lead you into OOP with examples, as oppose to other tutorials where they directly introduce you to concepts like inheritence/settters etc.. This makes my understanding of OOP much more clearer and structred. Big thanks to FCC and the lecturer!

    • @pointer333
      @pointer333 Před rokem +1

      More better than my comment!

  • @hammadhassankhan
    @hammadhassankhan Před rokem +17

    Loved It!
    I have been in a 4-Year CS program and learned the OOP concepts in different lectures.
    Probably this one is the best among all the lectures/tutorials I have taken for OOP till now.

  • @KofyImages
    @KofyImages Před rokem +19

    Less than 10 minutes into the tutorial and I understand what the class is. Some of these free tutorials teach better than actual courses we pay money for

  • @xelvince
    @xelvince Před rokem +13

    Best explanation on OOP on CZcams. He doesn't skip anything. It finally makes sense 😊

  • @johnhrabovsky2118
    @johnhrabovsky2118 Před 2 lety +18

    Sir, thank you for this absolutely fantastic run through of object oriented programming. I was struggling with some of these concepts in using python to build a Django website, but this tutorial cleared up a TON of information. Very well done, I along with 100K+ others, are incredibly grateful that you took the time to put this together to clear up some confusing concepts.

  • @sancrosanct5070
    @sancrosanct5070 Před 2 lety +74

    1. In the run validations to arguments part, if you aren't getting an error when you use an integer as the name, type in assert type(name) == str. This will not accept anything other than an integer as the name.
    2. Make sure you have no spaces between the list in the items.CSV file. Its a minor thing but gave me a headache since I couldn't get past that for a while. Then do the normal int(item.get()) then it works fine.
    Finally most of the issues I encountered were as a result of not looking at the code long enough. If you encounter a problem, make sure to re watch the part where he DOS it and make sure you got it correct. This happened to me at the Len part and a few others.
    Finally if you encounter s problem not stated here, then copy the error and paste it in your browser. This shows a stackoverflow page first where you can figure out what's wrong.
    Hope this helps you and you don't have to go through the headache I did when solving those lol

    • @alexjokyn5116
      @alexjokyn5116 Před 2 lety +1

      you are a legend

    • @yashnirmal3895
      @yashnirmal3895 Před 2 lety +1

      yeahhhh was facing the same headache...thank u very much!!!!

    • @oanr2475
      @oanr2475 Před 2 lety +1

      true saviour

    • @zorodielirido
      @zorodielirido Před 2 lety +2

      #2 gave me such a headache as well. i think i would still be sitting here trying to figure it out if i didn't see your comment. thanks!

    • @IurijZagorulko
      @IurijZagorulko Před 2 lety +1

      Man thx a lot!!!

  • @aminnourmohammadi5025
    @aminnourmohammadi5025 Před rokem +1

    This tutorial was hands-down the best I've ever watched regarding the essential concepts of object-oriented programming. You clarified so many of my unanswered questions. Thanks a million!

  • @federicopalacio5349
    @federicopalacio5349 Před 2 lety +16

    It's really really useful for begginers like me to have a tutorial builded from the scratch, instead of just downloading code from an external source and all of a sudden try to understand whats happening on those 50 lines of code. Thx

  • @fesehaabebe-akele2684
    @fesehaabebe-akele2684 Před 2 lety +10

    Very practical and understandable take on OOP in python. Greatly recommended to people with a beginner level knowledge of python and need to add OOP to their python tool kit.

  • @electricalautomationengine9128

    Wow, he wasn't lying . He really explains it well; you wouldn't need another tutorial .

  • @elijahkalii5290
    @elijahkalii5290 Před 2 lety +1

    This is the most comprehensive and friendly tutorial on Python OOP I have seen so far. Thanks for this Jim

  • @akhilkumar4825
    @akhilkumar4825 Před 2 lety +4

    Best intro to OOP so far. Explained so well. Thank you so much for this excellent course!!

  • @Rey-tp8jm
    @Rey-tp8jm Před 8 měsíci +3

    Great explanations! I like that you clarified certain aspects of OOP that are hardly ever mentioned in other OOP courses. Thank you!

  • @mohanprajapati2051
    @mohanprajapati2051 Před 2 lety +8

    Simply perfect ! Though I was doing revision but it helped me in learning the concepts easily.

  • @we1rdalien
    @we1rdalien Před rokem +2

    Great course! This took me from having a basic knowledge of OOP to understanding the logic of how it all works much more! Excited to keep going deeper with these topics!

  • @arunny9430
    @arunny9430 Před 2 lety +3

    Absolutely fantastic. Definitely, the best introduction to Python OOP I have seen so far.

  • @rutdvajrawal7933
    @rutdvajrawal7933 Před 2 lety +8

    20 mins in and so many concepts are made clear and so quickly and efficiently. Thanks the instructor and FCC.

  • @deadangelair
    @deadangelair Před 2 lety +1

    The practical way of explaining and the gradual pull into the concept was awesome. I am finally understanding. Thank you so much

  • @KnotaFurry
    @KnotaFurry Před rokem +2

    Thank you so much. I've been having such a hard time for hours trying to understanding classes and methods. This was perfect.

  • @alperklc7782
    @alperklc7782 Před 2 lety +50

    1:08 "is_integer" is a float method, since the name of the written method and the float method name are the same, there is a misunderstanding as if the method is calling itself again. It was a confusing example. It took me a long time to understand and figure out what was going on.
    7.0.is_integer() return True :)

    • @adviced8071
      @adviced8071 Před 2 lety +2

      same

    • @warrobotslovers3277
      @warrobotslovers3277 Před 2 lety +1

      Thank you very much . I was mulling over this doubt for a long time.

    • @karolinesilva4669
      @karolinesilva4669 Před 2 lety

      Thanks for this comment alper! I assumed it wasn't recursion but was scanning the comments for this confirmation.

    • @user-dp2yi2oy8g
      @user-dp2yi2oy8g Před rokem

      Thanks, was wondering the same

    • @llucbusquets6266
      @llucbusquets6266 Před rokem

      Damn, thank you so much. I was really wondering how a recursive function could work in this case and I was looking for people equally confused in the comments. It turns out it's easier than that :D

  • @irajesmaeili8032
    @irajesmaeili8032 Před rokem +4

    Great course, I liked the order of subjects so everything made sense while learning OOP.
    Many thanks!

  • @SPARCHE
    @SPARCHE Před rokem +1

    This is, by far, the best tutorial I've watched in a long time. Man have you got didactics for days. Congrats!

  • @michaeldimattia9015
    @michaeldimattia9015 Před 2 lety +1

    Thank you for such a clear and detailed tutorial! This helped deepen my understanding of these concepts. Absolutely worth watching!

  • @abdolahfrootan2127
    @abdolahfrootan2127 Před 2 lety +3

    A perfect course if you know the general concepts but they are not clear enough. Electrifying! Good Job

  • @lionelcarmont9574
    @lionelcarmont9574 Před 2 lety +2

    Thank you very much, For the last month I was wandering on the internet to understand OOP, with no success now it is crystal clear. Une fois encore, merci

  • @indometalpython4969
    @indometalpython4969 Před 2 lety

    ABSOLUTELY FANTASTIC!!! Thank you so much Jim. I followed this tutorial line by line and learnt so much. I owe you this new beginning of my life.

  • @eckee
    @eckee Před 6 měsíci +4

    This was insanely helpful. Easily understood, clear examples.

  • @SurajMapariPrivate
    @SurajMapariPrivate Před 2 lety +18

    He is great explainer bring him back again on this channel !!! ✨👏🔥💯

  • @rotrose7531
    @rotrose7531 Před 2 lety +25

    By far the best OOP python I ever found, clear, easy to understand, ensure that everything is crystal clear.

    • @8SecSleeper
      @8SecSleeper Před 2 lety +1

      That's because you didn't look hard enough. It's terrible compared to others.

    • @foray3573
      @foray3573 Před 2 lety +1

      @@8SecSleeper then suggest a better one for learners to watch better ones.

    • @mgm8075
      @mgm8075 Před 2 lety +2

      @@8SecSleeper still havent suggested better?

    • @8SecSleeper
      @8SecSleeper Před 2 lety

      @@mgm8075
      If you can't find the better videos, then you shouldn't be learning programming. It's not for you.

    • @mgm8075
      @mgm8075 Před 2 lety +11

      @@8SecSleeper instead of typing all that out you could've just shared the video you claimed was better. just say you're too lazy.

  • @motilevi3597
    @motilevi3597 Před 2 lety +2

    A very enjoyable comprehensive lecture, the study material is delivered in a clear and adequate manner

  • @htaehxela
    @htaehxela Před rokem

    this made more sense to me than any other OOP tutorial I have ever watched. Thank you so much

  • @alhensouher
    @alhensouher Před rokem +18

    For anyone who also installed the csv plugins but the "Table Editor" button didn't appear: you have to go to File | Settings | Editor | File Types, go to "Text", and then add *.csv to that file type. Confirm it and you're good to go. =}

  • @ass_awper
    @ass_awper Před 2 lety +6

    Thank you so much, I was looking forward for such a course

  • @ajinkyapotkar3439
    @ajinkyapotkar3439 Před 2 lety +1

    The whole concept of OOP is explained in a structured and easy to understand way. I am a beginner and learnt a lot from this. Looking forward to learn more from your videos . Thankyou

  • @vambylamby83
    @vambylamby83 Před rokem +1

    Learned a lot from this course, helped me to understand OOP better. Thank you so much, Jim and FCC.

  • @pointer333
    @pointer333 Před rokem +3

    I have to admit that when I heard the presenter's thick accent, I was worried, but I've just finished the entire video, and I must say that this was an EXCELLENT presentation. Turns out dude is very easy to understand. Speaks clearly, slowly, concisely, and precisely. Doesn't just superficially intro you to each topic--he really takes the time to explain the principles. A+!
    THANK YOU for taking the time to create and share this with the world! This was basically my into to object oriented programming and I really do feel like I've learned a whole lot after this 2+hr video!

    • @jimshapedcoding
      @jimshapedcoding Před rokem +3

      I appreciate such a comment a lot. Working on a smooth accent has been something I am working on a lot and I am happy you found your way to complete the entire video! Keep going :)

    • @MrIanEntertainment
      @MrIanEntertainment Před rokem +1

      @@jimshapedcoding I think your accent makes the video nicer to listen to

  • @doubando
    @doubando Před 2 lety +3

    Amazing OOP training, alot of concepts clear by now for me

  • @Andrey-rc6wp
    @Andrey-rc6wp Před 3 měsíci

    20 minutes in and the gentleman has clarified all the questions I had regarding OOP. This makes so much sense.

  • @pearlr.2411
    @pearlr.2411 Před 2 lety +1

    finished in one sitting after finishing a similar course on datacamp and I understood everything perfectly. thank you so much man

  • @djholty1234
    @djholty1234 Před rokem +17

    Great tutorial. I was a bit confused when you built your staticmethod is_integer at first. But then I realized float has a method built into it also called "is_integer", which will return true if the float ends in .0. Once I figured that out it made sense to me. Hope this helps someone who is confused by the same thing

    • @ZsoltPal23092011
      @ZsoltPal23092011 Před rokem

      Thank you, I have scrolled down the comments to see if someone had the same issue with this part - you helped a lot here :)

    • @user-bi8nd3wn7d
      @user-bi8nd3wn7d Před rokem

      I was about to ask the same, thank you! I think it was a bad idea to name the static method 'is_integer' since there already exists a float method with the same name.

  • @infographic7907
    @infographic7907 Před 2 lety +4

    man it's so amazing. You are so good at explaining. Thank you soo much for get me out of the confusions. ❤️🙏🙏

  • @BrannenTaylor
    @BrannenTaylor Před 2 lety

    THANK YOU for making your font size large enough to read on a tablet. So many channels don’t do this.

  • @jimalix6270
    @jimalix6270 Před 2 měsíci

    Awesome video! I'm half-way into it, and I've already learned more than I learned in an entire OOP class on another platform! Thanks so much!

  • @utsavbhardwaj938
    @utsavbhardwaj938 Před 2 lety +13

    I was trying to learn oop concepts for a very long time and I was having a very hard time learning this then found this video, still in the 1st chapter __init__ and most of the things I was having hard time with got very clear.
    Thanks for this, I will always remember you.
    FCC is doing great work finding these high quality videos .

    • @Anonymous-ri4mk
      @Anonymous-ri4mk Před 27 dny

      Me too everyone else was giving shitty explanation or explanation that just doesnt make sense it seems they have forgotten their target audience are intermediate level or lower and they cant understand it by the general explanation which are given to people who knows how to do oop

  • @fadymikhaiel2370
    @fadymikhaiel2370 Před rokem +12

    The thing that most tutorials miss is an indepth explanition of the logic of how things work. Fortunately, this tutorial does not skim on explaning the logic and also giving examples of use cases. Thanks Jim!!!

  • @ShizoMoses
    @ShizoMoses Před 27 dny

    This was absolutely excellent. Right on the point, no fluff - perfect for a refresher (or rather clarification), but I can absolutely see this being accessible to absolute beginners. Really nice, thanks a lot. :)

  • @James24127
    @James24127 Před 11 měsíci +1

    Thank you for this tutorial. I've participated in a number of courses and by far this is the best object oriented programming course I've seen.

  • @ddelvaller
    @ddelvaller Před 2 lety +3

    Thank you very much Jim, this helped me a lot to understand OOP

  • @unpatel1
    @unpatel1 Před 2 lety +35

    OMG!!! I am finished only 23:30 and this so amazing!! Looks like this video is going to be in my permanent youtube storage vault!:):) I already have decided to watch it more than once. Already cleared up a few critical concepts that I was struggling with. You have an amazing explanation power.

    • @pointer333
      @pointer333 Před rokem +1

      Yes! I've been chipping away at it for 3 days and just finished. SO GLAD I FOUND THIS. I want the channel to know how awesome they are!

  • @ali333291
    @ali333291 Před 5 měsíci

    Such a lovely way to explain the OOP. Practical project based examples makes it even more interseting. Thank you

  • @plamenyossifov6135
    @plamenyossifov6135 Před 2 lety +1

    This is gold. Jim is awesome! For sure in my top 3 best teachers. So easy to understand.

  • @awosiseoluwaseun5499
    @awosiseoluwaseun5499 Před 2 lety +20

    The is_integer function name almost confused me. is_integer is a method on its own in python so I thought you were calling your defined function inside the function itself. I'm clear now, made me research more and I'm happy about that. An awesome video by the way, I've mastered OOP basics from this. Thanks so much.

    • @edhernunio
      @edhernunio Před 2 lety +3

      It got me confused as well. Thanks for the clarification 👍

    • @ItsDaShin
      @ItsDaShin Před 2 lety +1

      Oh wow. I spent like 15 minutes trying to figure out the code. Thanks! 😅

    • @StarFury2
      @StarFury2 Před 2 lety +2

      Jesus, this was super confusing. I guess he could have called his staticmethod like "check_if_is_integer" to make a difference from the inbuilt function. Super awesome video anyways!

    • @HereToSin
      @HereToSin Před 2 lety +1

      @@StarFury2 1:09:00 One thing which you could also observe was that there were no parameters passed when calling the is_integer() {in line 45}, so no way would the is_integer method of the item class would be called, as that would require passing num parameter. But yeah, this was confusing at first glance!

  • @innocent006
    @innocent006 Před rokem +9

    The explanation on this tutorial is very clear and to a point. I understood lots of things, which was a bit of a magic before this video. Thank you very much and keep posting fruitful videos

  • @geetikas3286
    @geetikas3286 Před 2 lety +1

    Theory intensive but very crisply explained! Excellent video!

  • @steviegillen82
    @steviegillen82 Před rokem

    OOP has always been a sticking point for me, but thanks to this in-depth tutorial, it is all starting to make sense. Thank you FCC for posting this!

  • @peachgumdrop8067
    @peachgumdrop8067 Před 8 měsíci +3

    The best OOP video ive ever seen. I would have failed without you LMAOO my profs could never compare.

  • @venkilfc
    @venkilfc Před 2 lety +3

    What a brilliant course! Thank you :)

  • @NathanBerhe-gw5wv
    @NathanBerhe-gw5wv Před 3 měsíci

    watching it now 2 yrs after it was published. Super amazing. Thanks buddy.

  • @centralcodingethiopia
    @centralcodingethiopia Před rokem +1

    I was Struggling to understand the concept of Class through tutorials, but this tutorial helped me to really understand well.
    Thanks a lot!

  • @smburhan6323
    @smburhan6323 Před 2 lety +3

    This is just the thing i was looking for... Thank you very much ❤

  • @ShubhamMusafir
    @ShubhamMusafir Před 2 lety +3

    waiting for this from a long time , thanks :)

  • @mlrk3y858
    @mlrk3y858 Před 9 měsíci

    Thank you so much for this amazing tutorial! I’ve only been learning python for a few weeks but this helped me understand many core principles of OOP. Not going to lie, a little of this was still over my head but I’ve saved this video so I can watch it a few more times of the next few months. Thanks again

  • @TuxedoDonutz
    @TuxedoDonutz Před rokem

    Literally the Best OOP tutorial I've found. Thanks so much. Subbed to both.

  • @prabhakar664
    @prabhakar664 Před 2 lety +3

    Watching at 0.75 X. This is by far the best tutorial on OOP. Hands Down.

  • @farazahmed1668
    @farazahmed1668 Před 2 lety +4

    Thank you so much for this extremely useful tutorial.

  • @hakimled4300
    @hakimled4300 Před 2 lety

    I have already watched and downloaded your videos on my computer.
    A great course thank you Jim

  • @stevenho9963
    @stevenho9963 Před měsícem +1

    i am a self taught programmer and previously ive tried to learn linked list and got totally lost and confused. i was told i should learn OOP first. my friend had a syllabus for a OOP class, but i didnt want to spend threee months on it so i went onto this video and i learned so much. took about 3-4 days digesting information. you broke down the steps in a way thats easy to digest and remember. although this topic has a lot of information, now i see all i need is to practice these concepts often and ill get it. you have explained in two hours a whole entire syllabus that would take aquarter, which is about 3 months. thank you so much

    • @jimshapedcoding
      @jimshapedcoding Před měsícem

      I really appreciate this one, thank you and I am very happy I saved your time :)

  • @zainulabdin4466
    @zainulabdin4466 Před 2 lety +10

    1:08:52 The name "is_integer" was a bit confusing because same method exists for 'float' class so in first IF statement num.is_integer() has nothing to do with the is_integer function that has been created in this code. That is_integer() method is pre-defined for the float class and that is only there to check if the num is a float or not and returns TRUE.

    • @jimbowayoutub2
      @jimbowayoutub2 Před rokem

      Yes. Exactly. Great tutorial but this was a flub in presentation. Thanks for clarifying.

    • @akhilmachaan5010
      @akhilmachaan5010 Před rokem +1

      @@jimbowayoutub2 Can you please explain this, 01:07:07
      if isinstance(num, float):
      #Count out the floats that are point zero
      return num.is_integer()
      what happens when we return num.is_integer()

    • @jimbowayoutub2
      @jimbowayoutub2 Před rokem +1

      @@akhilmachaan5010 Hi. The instructor added a static class to his Item class called is_integer() that returns True if num's type is integer and false if it's a float by using the isinstance() method built into python. But that alone would still interpret a number like 5.0 as a float just because it has a decimal. He wants his method to return True in such cases. Now because num is float he can call the is_integer() method that is *built into python's float class* ( same name but different function) One is created by Jim. The other built into Python's float class. Hope that helps.

  • @user-iq1fg2um5k
    @user-iq1fg2um5k Před 2 lety +12

    Я просмотрел все 2 часа этого курса, и научился читать код, и понял общие правила ООП. То что раньше было сложно понять, понимать стало гораздо проще.
    Вместо повторения \ дублирования кода, можно написать код лаконично, и он будет выглядеть очень аккуратно, это очень круто.
    Мне жаль что на просторах интернета, на Русском сегменте, вот таких полных курсов очень и очень мало, но найти ваш канал было просто волшебно.
    За 2 часа, начиная от самого простого, переходя постепенно к пониманию того что происходит, с указанием что откуда наследуется и передается, в общем я очень рад что эта информация очень полезна для меня.
    Осталось только научиться делать это самостоятельно, и продумывать код и его логику. Жаль у нас не было уроков программирования, да и преподаватели обычно не умеют доносить информацию понятным и простым языком, объясняя сложные вещи простым языком.
    Благодарю вас.

    • @jimshapedcoding
      @jimshapedcoding Před 2 lety +4

      You are welcome! :) I hope there will be more Russian lecturers in CZcams to help you learn even better!

  • @user-kt3jj7kf5c
    @user-kt3jj7kf5c Před 9 měsíci

    this is the best OOP video i have ever watched. i also got confused with the concepts used in OOP such as init,self and how to use them and what is the actual mean behind these concepts now has been revealed. thank you very much for your great content.

  • @durgeshkshirsagar116
    @durgeshkshirsagar116 Před rokem +2

    What an excellent tutorial! Amazing man. You are a wonderful teacher. Hats off to you. God bless you!

  • @54peace
    @54peace Před 2 lety +19

    God bless this man 🙏

  • @danieloluwarotimi48
    @danieloluwarotimi48 Před rokem +4

    Hey, For anyone here who might be struggling with a 'NoneType' error when trying to call ur CVS file and convert it into a list, go back and make sure there are no spaces in between attribute names. Remove all extra needed spaces
    example:
    should be: name,price,quantity
    not: name, price, quantity

  • @BilalTroll
    @BilalTroll Před 9 měsíci

    This has really cleared up my issues, thank you so much. It has clicked, finally!!

  • @Blentux
    @Blentux Před rokem +1

    I'm now halfway through, but this is an excellent video for learning OOP, always struggled with it, but this one is just great, so thanks a lot!!
    Learned so much from it.
    EDIT: I've completed the whole video by now - what a journey, thank you so much for this course!!

  • @tasnimmeem1158
    @tasnimmeem1158 Před 2 lety +23

    Just what I needed ❤️

  • @SurajMapariPrivate
    @SurajMapariPrivate Před 2 lety +4

    Learned so much from single video thanks alot 👏✨💯🔥🔥

  • @Alexr26
    @Alexr26 Před 11 měsíci +1

    This is a top notch crash course. Simple and short to start building stuff. Thank you!

  • @gideonidumah2495
    @gideonidumah2495 Před rokem

    This guy is very good with explaining and teaching. I really learnt a lot from about OOP that had been confusing to me. Thank you so much

  • @gauravmahajan3035
    @gauravmahajan3035 Před 2 lety +12

    Thanks!

  • @devanshjain5145
    @devanshjain5145 Před 2 lety +9

    I think naming that is_integer(num) method was wrong because already there exists an inbuilt method called is_integer() that can be called upon floats.... All this while I was thinking of recursion....

    • @-steady-8215
      @-steady-8215 Před 2 lety

      Haha. Yeah. Took some time to get it cleared for me.

    • @rogue8275
      @rogue8275 Před 2 lety

      I didn't understood what happened there ... To me it seems to be an infinite loop

  • @ashishgudhekar3045
    @ashishgudhekar3045 Před 4 měsíci

    your speed of teach is faster but understandable and which cover lot. thank you sir.

  • @alisahibqadimov7659
    @alisahibqadimov7659 Před 10 měsíci

    THANK YOU !! I have just absorbed all the course in detail. Now I can confidently write my OOP style programs

  • @cristiandinu2906
    @cristiandinu2906 Před 2 lety +10

    Hi, Thanks for posting !!! , there is a catch at least in unix ( !!! items.csv file has spaces in front of columns price, quantity which triggers an error : price=int(item.get('price')),
    TypeError: int() argument must be a string or a number, not 'NoneType')

    • @opeo5418
      @opeo5418 Před 2 lety +1

      Having this same error with the NoneType as well

    • @hkoranteng1
      @hkoranteng1 Před 2 lety

      same, but i removed the spaces from my csv file and the error went away. although now, i'm not able to see the objects in the console though. when i run the code Item.instantiate_from_csv(). it's blank after the ...python.exe ...tutorial.py. still trying to figure it out ... so not actually sure if the items in the csv are being created as objects in my program

    • @hkoranteng1
      @hkoranteng1 Před 2 lety

      when i run print(type(item.instantiate_from_csv())) it returns --->>>
      that doesn't sound right! has anyone faced a similar issue? better still, have any ideas?

    • @mohamedasif5871
      @mohamedasif5871 Před 2 lety

      @@hkoranteng1 It is because we are not returning anything in the instantiate_from_csv method.
      You should try printing Item.all to know if the ob
      jects has been instantiated.

    • @walky4158
      @walky4158 Před 2 lety

      @@hkoranteng1 Thank you mate. I was confused where I was being wrong, and I read your comment about spaces. Fixed the error and I can now proceed with the tutorial. Thanks.

  • @sweetie_py
    @sweetie_py Před 2 lety +5

    I'm fluent at OOP in Java and now I feel stuck when doing it in Python lol

  • @anvesh12
    @anvesh12 Před rokem

    Being familiar with OOPs concepts already i came here just to brush thing up! Luckily i learnt lot of new things. You just nailed it JIM. Thanks ! Keep teaching!

  • @surfingamerica2363
    @surfingamerica2363 Před 11 měsíci +1

    I really appreciate the VID, it was very good, I spend the last month been clueless about the lections of my teacher, and I also watched a bunch of vids about classes, and I couldn't get the comprehension I got from your explanation, really good content !🤙

  • @Simon_Alexnder
    @Simon_Alexnder Před 2 lety +5

    Shalom!

  • @rayyanamir8560
    @rayyanamir8560 Před 2 lety +4

    I prayed to God for this

  • @manojkumar-pt5zz
    @manojkumar-pt5zz Před 2 lety

    It's an excellent video with a clear-cut explanation for a learner like me. I have watched many videos for understanding these concepts finally this one made me understand them clearly.

  • @pkavenger9990
    @pkavenger9990 Před 2 lety

    Now i am in this video for 50 minutes and I got to say, this video is golden. This video is like if you want to digest 1000 pages of content in one video. Truly Awesome.