Officially, this channel has the most valuable Python content on the whole Internet .... for a beginner. I have been struggling for weeks trying to understand the most basic concepts until today.
Man you don’t how much of favor you did to me with your tutorials, I spent money and I couldn’t understand OOP but after this video I did , Thank you so much you are a blessing .
I'm an accountant with literally zero programming knowledge. Started following your tutorials a week ago. I'm surprised I understand everything so precisely. Your explanations are as "dumbed down" as can be. Thank you
To my understanding now, self means the object name being called. Because in class there can be lot of objects being created and self will default to that object.
Amazing video. I'm reading a book on Python rn and the section on classes and objects is very convoluted; this simplified things greatly!!! For anyone else learning Python, I think the key is to use multiple sources when a topic is confusing.
I´m an illustrator trying to learn some program and understand how it works... and must say you are the best man, it´s so clear and simple the way you teach this... is amazing
This and the other video on Classes and Objects really helped me break down a mental wall. Teaching myself so don’t have formal resources but you are filling that role well (:
I started learn python a week ago, but in your channel what I saw that the person who teach me python, you can do much better. Anyone will understand your logic and what you can try to say. Keep up man. As I saw your passion is making RUclips, man you've earned it...
I have been watching so much tutorials, reading so much documentation about this, and I watch your vid. Not even 5 minutes after I just had the biggest realization. Thank you
I am very Thankful to you for this tutorial I was confused when I saw your "Introduction to Classes and Objects" Tutorial, but now my confusion is gone as I have now seen this tutorial May ALLAH (The God) Bless you
I came back to comment on this video. I am a beginner in data science, currently receiving a 3-month training program to usher me in this field. Apart from being a beginner, we finished 'Introduction to python programming in a week and I was so overwhelmed. I watched a 7-hour video here on youtube and I nearly gave me because everyone else made it difficult. P.S I am from a college arts background. I chanced on CS Dojo's Channel and was quite skeptical because the video is short as compared to other python programming tutorials here. In just 11 mins, I can write classes and objects off the head and run them without error. Cs Dojo, a thank you can never ever ever be enough. I really appreciate you, Sir
i spent like 4 hours reading and re-reading my (very expensive) college textbook trying to understand this, and this video taught me everything the book was trying to say in like 10 minutes
THANK YOU SO MUCH! For some reason I could never grasp what was going on with classes. Your teaching style is excellent: you were able to break this down to where I could finally understand it
DOJO! I have only watched a bit so far but I have already noticed something special about your style of instruction. I want to say thank you for bringing out subtleties such as intentionally using different names for the formal parameters and the class variables! Using the same name is a wonderful convention, but by initially breaking that convention, students are much less likely to assume that they have to match for the code to work. This subtlety is important for a computer science student to progress from writing a little python to actually understanding what they're doing! Kudos!
What I really love about these videos are the simplicity of the language used, which makes it easy for a beginner to quickly grasp the concepts of classes. I'm glad I found your channel. :)
when you define the class with the function, you enter in parenthesis "(self, name, color, weight)", and when you enter the element it refers to the function like Robot("Name", "color", weight). My question is: In the function you are entering 4 things, but when defining the element you entry 3 properties. How does the code understand that "name" goes to name and not to self if self and name occupy the first position? because we saw in earlier videos that the first entry in the reference will replace the first entry in the function... what does the code understand by "self" and why is it different in this case?
I have my semester exams in a couple of weeks with full of obsolete curriculum, and here I am restarting Python. Your way of teaching is really appealing and engaging. Glad to be part of Dojogang :')
I've looked at numerous other videos on this specific __init__ subject. This video is the clearest and easiest to understand. I finally understand the purpose of the __init__ function. THANK YOU THANK YOU!
The init function is run when the class is first initialised. It is already there but contains no code. You can overwrite it by redefining. This means you can put all of your variables like in the video inside of it.
How do we print more than one variable? what if we want the function introduce_self to say, for example, Hello my name is Tom I am Red I weigh 30 lbs I get an error saying I cannot concatenate
I believe you can do it like this 'def introduce_self(): print ("hello my name is Tom") print ("I am Red") print ("I weigh 30 lbs")' and then call the function with 'introduce_self()'
Great idea i am also learning english and it is so hard to find good python tutorials in my native language and it would get so easier to learn with english subtitles, i hope he sees your comment and put the it in the next video!
Guilherme Alfredo there r 3 dots on right top side. Like ' : ' this. THERE'S caption option... In my RUclips app yes it's there. Try r search it there.
Yes. Write a function etc., use the import module to use that function etc. in a file. import random # built-in module guess = int(input('Guess my number: ') x = random.randrange(101) if guess == x: print('Awesome!')
Its not a function, a function already has information in it, compare the function to an apple pie, a class is like a recipe, with the class you can make all sort of cakes
I was sooo frustrated with this class thing and __init__ . but after loooong search I found you again, I always found your videos easy to understand. yea I know Im not the sharpest one here. I almost quit learning programming because of these thing. Im still not confident enough though. But Thanks a lot.
it still works if you use something else but i think it's just a convention. i guess it just makes it easier for someone else to read it. the one thing that needs to stay the same is the __init__ custom function
dude this tutorial helped a lot! I don't know why college classes are taught in a manner that makes it so that you can't make mistakes. learning is 99% making mistakes.
I know this video is a few years old, but I wanted to make sure to comment and say good job! Very simple and straightforward, something a lot of these "basic python" videos lack. The way you explained attributes and the __init__ method is something that a lot of videos don't even go over or explain the why (and the reason I was watching this video in hopes it would be explained!)
I have seen several lectures related to class and objects, i find your lecture is the best, no one can explain python classes and objects than you ! Thank you so much. Love from Asie ♥
This video gives me a huge relief. ngl, I was so frustrated after watching 2 video tutorials and reading 2 articles about OOP and couldn't understand a thing like the way I did in python previous lessons, until i found this.
I've watched so many videos trying to grasp this concept, but only from your video have I attained clear understanding! Thank you so much! I look forward to watching part 2.
class Robot: def introduce_self(r1): print("My Name is " + r1.name) r1 = Robot() r1.name = "Tom" r1.color = "blue" r1.weighr = 30 r1.introduce_self() #we can right r1 instead of self.name as you wrote in python 9 # i tried and it works
THANK YOU SO MUCH YOU SAVED MY LIFE TODAY. I've been trying to understand this but it wasn't clicking and I recently started using python to write automated tests for work. I felt like if I didn't grasp this I was going to give up. Thank you so much.
What took me 3 days and countless resources to semi-understand, you broke down in 2 videos for me. Absolute hero
"Strive not to be a success, but rather to be of value." - Albert Einstein
The value you're providing is immense. THANK YOU!
thx man, really good quote
Hii
Don't take his name, cause CS Dojois from Japan.
Remember who made Hiroshima's history possible.
I agree with you, although my English is weak, I understood because he was very simple in conveying information
@@tariqalotaibi4852 me too i can understand veryyyy easily rather than others english
Whoever disliked this video truly confuses me, it is a well put together video that is super helpful
A pure tutorial from scratch... Well done bro
Agreed; however, what is a 1.5% out of a 100?, so I think this is a great as you can get, the rest...don't even worry about. Cheers
don’t worry they’re are a lot of AI that automatically dislike videos corresponding to the amount of views so yea
ovi some absolute douche. youtubers like this one are great
@@skaito Yeah? Seems a little farfetched.
why is he not recoginized like other youtubers, his works are always so perfect, clear and easy to understand even the complex topics
Officially, this channel has the most valuable Python content on the whole Internet .... for a beginner. I have been struggling for weeks trying to understand the most basic concepts until today.
You just taught me everything I learned in a 3 hour class
:)
I had a whole course about just that and didn't understand anything. Now I understand what we did in that course by only watching a 10min video xD
Man you don’t how much of favor you did to me with your tutorials, I spent money and I couldn’t understand OOP but after this video I did , Thank you so much you are a blessing .
Love those robots - spent over an hour reading a textbook on classes and objects. Was completely lost. The robots illustration is a great idea.
could u explain this to me???bcz i dont get this..
@@sidrafarooq2064
Hi I'm not sure if you still need this, please let me know if I can try to help
OMG.. Just on time.. I will have my ML mid exam in less than 3 hours.. And no one can explain classes in python better than you 😀😀
How'd it go?
yeah man, how'd it go?
It was long time ago🙈..
But it was very good👌👌👌
glad you made it
Thank you.. And good luck to you
Thank you so much! Just had the biggest “Oh shit, I get this now!” moment.
SAME!!
i was about to give up programming and then he explained simply but with clarity!
Same here! Thank you very much for your explanation.
You not alone! #MeToo!
the same oooh god he's good at explanation
Same, I've researched classes and OOP a bunch before and now I finally get it all. Thanks so much for the video!
Thank you. Your video is clear, informative, straight to the point, and encouraging to me. Keep posting new one. I am enthusiastically look forward.
I'm an accountant with literally zero programming knowledge. Started following your tutorials a week ago. I'm surprised I understand everything so precisely. Your explanations are as "dumbed down" as can be. Thank you
The way that you introduce the need for the '__init__' method is the best I have seen so far. Thank you :)
same. been tryna figure out what the hell that is
@@じゅげむ-s6bsamee
6 Years Later, Still Immensely Helpful. Thankful for this gem of a video. Clear, concise, and beginner-friendly.
OMG... just in time. My ml final exam is 10 yrs away and this helped me so much. No one can explain classes better than you.
Damn its been 5 years, you might wanna start revising for that test you got there
Initially did not understand that ‘self’ like ‘this’ in Java has a special meaning in Python and passes the object name. Great job.
To my understanding now, self means the object name being called. Because in class there can be lot of objects being created and self will default to that object.
@@yahoobolt big fax
Please keep doing these! They are an immense help and I don't know what I'd do without them! You are a seriously good teacher!
i am truly satisfied by the way u say "robot" , btw it was a well made and concise video , it was really useful
Amazing video. I'm reading a book on Python rn and the section on classes and objects is very convoluted; this simplified things greatly!!! For anyone else learning Python, I think the key is to use multiple sources when a topic is confusing.
bro pls stop reading books tutorials are more powerful
You explained classes more succintly and clearly that anyone else in 11 minutes
CS Dojo truly understands the content as he is able to clearly and easily articulate what and how these concepts work. Applause is in order!
I´m an illustrator trying to learn some program and understand how it works... and must say you are the best man, it´s so clear and simple the way you teach this... is amazing
This and the other video on Classes and Objects really helped me break down a mental wall.
Teaching myself so don’t have formal resources but you are filling that role well (:
You are the best tutor. No one else can teach like you.
Thank you for finding my glasses so that I could see the consept of classes!
Simple and tasty walkthrough! No question asked.
I started learn python a week ago, but in your channel what I saw that the person who teach me python, you can do much better. Anyone will understand your logic and what you can try to say. Keep up man. As I saw your passion is making RUclips, man you've earned it...
So glad I found this channel 🙂. Classes have been the most challenging for me so far in my python learning. Thanks!
I have been watching so much tutorials, reading so much documentation about this, and I watch your vid. Not even 5 minutes after I just had the biggest realization. Thank you
You have a talent, my friend. Thank you for putting in so much thought on how to convey this subject.
I am very Thankful to you for this tutorial
I was confused when I saw your "Introduction to Classes and Objects" Tutorial, but now my confusion is gone as I have now seen this tutorial
May ALLAH (The God) Bless you
Print, my name is
Print, my name is
Print, my name is
The real slim shady
chicka chika Errrr ERROR
Please stand up
🤣🤣🤣
BRo THIS VIDEO WAS UPLOADED ON MY 18th BIRTHDAY
print( 'No one cares what your name is, you jabroni!' )
I came back to comment on this video. I am a beginner in data science, currently receiving a 3-month training program to usher me in this field. Apart from being a beginner, we finished 'Introduction to python programming in a week and I was so overwhelmed. I watched a 7-hour video here on youtube and I nearly gave me because everyone else made it difficult.
P.S I am from a college arts background.
I chanced on CS Dojo's Channel and was quite skeptical because the video is short as compared to other python programming tutorials here. In just 11 mins, I can write classes and objects off the head and run them without error.
Cs Dojo, a thank you can never ever ever be enough. I really appreciate you, Sir
Great one! Keep up the great work man!
@killmoo h3h3 what about...?
@killmoo I haven't seen it in a while but I probably remember it.
This is the best beginner class tutorial ive ever seen
Thanks CS Dojo☺☺
You are reaching more people than there are in an entire university. Thankyou
Thank youuu, understanding classes has been really challenging for me and this is starting to help :) great examples
i spent like 4 hours reading and re-reading my (very expensive) college textbook trying to understand this, and this video taught me everything the book was trying to say in like 10 minutes
Oh, I've missed you so much, CS Dojo!
I even started to learn Javascript in the meantime! ^__^
u did not recieve a single like in 2 years so I liked ur comment
:>
@@cryslin2.066 Thx. It's very kind of you.
your way of teaching is far more better than what i am being taught on udemy.MAN YOU ARE GENIUS
i Had also love to see you creating some important but moderately short programs while using OOP.
After long years, I understand what is classes and objects. Great Job! Thank you so much!
Great Job, well done sir...Keep up the great work!!!
For some reason I just couldn't wrap my head around classes but this video just made them click. Thank you so much!
print("you are amazing!")
you are amazing
@@krenze1164 oh shit the program broke. it forgot the last index
I can't believe this is free on RUclips - thank you!!!
thanks for the video, been waiting for it
THANK YOU SO MUCH! For some reason I could never grasp what was going on with classes. Your teaching style is excellent: you were able to break this down to where I could finally understand it
I came to this video to learn what I "learned" in a course of someone else.
DOJO! I have only watched a bit so far but I have already noticed something special about your style of instruction. I want to say thank you for bringing out subtleties such as intentionally using different names for the formal parameters and the class variables! Using the same name is a wonderful convention, but by initially breaking that convention, students are much less likely to assume that they have to match for the code to work. This subtlety is important for a computer science student to progress from writing a little python to actually understanding what they're doing! Kudos!
This is tough
What I really love about these videos are the simplicity of the language used, which makes it easy for a beginner to quickly grasp the concepts of classes.
I'm glad I found your channel. :)
Why your thumbnail includes code from Pycharm but your tutorial is on jupyter I'm triggert
Extremely clear and informative video. I cannot understand why anyone would dislike this vid
Thanks for this
CSdojo the savior for students from Canada
Hiii my name is dinesh i am your biggest fan You are super
From Pied Píper.
You are the best person to teach this object and class. Thanks cs dojo. Love from india 🇮🇳.
when you define the class with the function, you enter in parenthesis "(self, name, color, weight)", and when you enter the element it refers to the function like Robot("Name", "color", weight). My question is:
In the function you are entering 4 things, but when defining the element you entry 3 properties. How does the code understand that "name" goes to name and not to self if self and name occupy the first position? because we saw in earlier videos that the first entry in the reference will replace the first entry in the function... what does the code understand by "self" and why is it different in this case?
Self is inbuilt by python and it gets recognised as the object that has been created so it gets ignored
I have my semester exams in a couple of weeks with full of obsolete curriculum, and here I am restarting Python. Your way of teaching is really appealing and engaging. Glad to be part of Dojogang :')
I study computer science, but don't understand anything of it :S Maybe I should reconsider my choise or check my IQ one more time..
ruclips.net/video/vlf4Pn9nMug/видео.html
Same lol
I've looked at numerous other videos on this specific __init__ subject. This video is the clearest and easiest to understand. I finally understand the purpose of the __init__ function.
THANK YOU THANK YOU!
can explain more about __init__ function?
The init function is run when the class is first initialised. It is already there but contains no code. You can overwrite it by redefining. This means you can put all of your variables like in the video inside of it.
@@skalex055 Is that comparable to an constructor?
@@derfrueder5975 yes, it will run when the class is created.
Try to understand OOPS concept
it helps you to understand it
Bro, you dont know how much of a help your videos have become, we are so thankful and hoping you the best you deserve!
Thank you !.. FInally I understood what the hell are "Classes" !!! :)
Hands down the best explanation of OOP I've seen. Thank you!
How do we print more than one variable? what if we want the function introduce_self to say, for example,
Hello my name is Tom
I am Red
I weigh 30 lbs
I get an error saying I cannot concatenate
I believe you can do it like this
'def introduce_self():
print ("hello my name is Tom")
print ("I am Red")
print ("I weigh 30 lbs")'
and then call the function with 'introduce_self()'
class Robot:
def ___init___ (self, name, color, weight):
self.name = name
self.color = color
self.weight = weight
def introduce_self(self):
print("my name is " + self.name )
print("my color is " + self.color )
print("my weight is" + str(self.weight ))
r1 = Robot("Tom", "red", 30)
r2 =Robot("Jerry " , "blue", 40)
r1.introduce_self()
r2.introduce_self()
Thank you for making this so simple and easy to understand. I was stumped by Class for an entire week until I watched your video.
Hey bro...U R Great as always ! I have one question though,
What is the use of classes and is it helpfill in Machine Learning or Deep Learning?
I finally found a youtube channel that explains everything properly! Thank you very much for the great explanation.
Could you put English subtitles in the videos,please?.I am Just learning english, and it would be so easier to watch the videos.
Great idea i am also learning english and it is so hard to find good python tutorials in my native language and it would get so easier to learn with english subtitles, i hope he sees your comment and put the it in the next video!
I was about to ask the same thing.
Turn on captions from options.
Guilherme Alfredo there r 3 dots on right top side. Like ' : ' this. THERE'S caption option... In my RUclips app yes it's there. Try r search it there.
dude I have been watching python videos everywhere but yours are so much easier to understand!
friend plz make a QnA video i have many questions for you
What are your questions? :)
Can we make our own packages in Python and import in our program?
Yes plz tell I was also having this confusion?
Yes. Write a function etc., use the import module to use that function etc. in a file.
import random # built-in module
guess = int(input('Guess my number: ')
x = random.randrange(101)
if guess == x:
print('Awesome!')
No,My Question is can i create my own packages
This is by far the best explanation I have come across.
isn't this just a function with extra steps?
Robin Kovačić that’s what confuses me, what’s the purpose of it
Its not a function, a function already has information in it, compare the function to an apple pie, a class is like a recipe, with the class you can make all sort of cakes
I was sooo frustrated with this class thing and __init__ . but after loooong search I found you again, I always found your videos easy to understand.
yea I know Im not the sharpest one here. I almost quit learning programming because of these thing. Im still not confident enough though. But Thanks a lot.
Hai cs dojo what happens if we doesn't use the word self.
it still works if you use something else but i think it's just a convention. i guess it just makes it easier for someone else to read it. the one thing that needs to stay the same is the __init__ custom function
dude this tutorial helped a lot! I don't know why college classes are taught in a manner that makes it so that you can't make mistakes. learning is 99% making mistakes.
I don't trust chinese in programming...
I'm just joking I love you chinese man
Yes they spread covid.
@@horrorstoriestolisteninthe2354 bruh, have some shame
Explained it 10 times better than my teacher. RUclips saves the day again.
how did you "#" multiple lines at one time?
@Berke Icel works! thx!
Or you can do this ' ' ' hello hey ' ' '
I know this video is a few years old, but I wanted to make sure to comment and say good job! Very simple and straightforward, something a lot of these "basic python" videos lack. The way you explained attributes and the __init__ method is something that a lot of videos don't even go over or explain the why (and the reason I was watching this video in hopes it would be explained!)
I have seen several lectures related to class and objects, i find your lecture is the best, no one can explain python classes and objects than you ! Thank you so much. Love from Asie ♥
This video gives me a huge relief. ngl, I was so frustrated after watching 2 video tutorials and reading 2 articles about OOP and couldn't understand a thing like the way I did in python previous lessons, until i found this.
this video is still saving lives, four years later
Dude I've taken multiple course and watched so many videos trying to understand this and I never did until now, kudos!!
I've watched so many videos trying to grasp this concept, but only from your video have I attained clear understanding! Thank you so much! I look forward to watching part 2.
Anyone is not understand able about the above one then just see his previous video about classes then watch this that worked for me :)
Tech Lead & CS Dojo are the best programming youtubers.
This is literally the most helpful Python OOP video of all time, thankyou so much!!!
I am a beginner and I like your videos a lot. Your tutorials help me to easily understand and execute the concepts.
Such a wonderful tutorial never gets old. It helps anyone who wants to know Python classes. Many thanks for this!
class Robot:
def introduce_self(r1):
print("My Name is " + r1.name)
r1 = Robot()
r1.name = "Tom"
r1.color = "blue"
r1.weighr = 30
r1.introduce_self()
#we can right r1 instead of self.name as you wrote in python 9
# i tried and it works
You cleared my doubts about constructors which I wasn't able figure out for several weeks. Now I can sleep tonight with no doubts. Thanks.
THANK YOU SO MUCH YOU SAVED MY LIFE TODAY. I've been trying to understand this but it wasn't clicking and I recently started using python to write automated tests for work. I felt like if I didn't grasp this I was going to give up. Thank you so much.
By far the most easy to understand and down to earth explanations. You are extremely talented please keep this up!
Your vids are way better than the ones out of a course I paid for. Thanks so much for taking the time. Consider me subscribed!
I thought this video was gonna be for only CS experts and full of obscure references, but for once, everything makes sense to me.
I'd never been taught this in class, but ALL of my assignments uses class. Thank you for the explanation!!
no one can explain classes in python like you do!!
thanks a lot :)