#49 Python Tutorial for Beginners | Class and Object

  Рет қаралды 845,861

Telusko

Telusko

Күн бұрын

Пікірлер: 444
@sivaprasad-0206
@sivaprasad-0206 Жыл бұрын
This is beyond excellence! After 24 years, I'm finally understanding how classes actually work.
@motivationda2067
@motivationda2067 8 ай бұрын
THEN MY 2 YEARS DOESNT MATTER IT SEEMS LOL
@davidnjoagwuani8184
@davidnjoagwuani8184 5 жыл бұрын
Not all heroes wear capes! This video was the "silver bullet" i needed to understand classes in python. Hope to see more videos concerning other aspects of python.
@souvikmakur9695
@souvikmakur9695 2 жыл бұрын
@HYPER FF lol
@edwardgregory9219
@edwardgregory9219 4 жыл бұрын
this is how I understood it and I hope it can help others in their thought process, its a bit long but worth the read. · The logic in creating Classes and its objects are similar to how we work with functions. · Remember when we create a function, we 1st define it with a keyword, 2nd assign it with arguments, 3rd give the logic/conditions (we know these as statements) 4th return the values and 5th call the function to execute it. In the aforementioned process we have ( : ) colon, which indicates that it’s a function and followed by its appropriate indentations. · In Classes we have a similar process of syntax, 1st, we create the class by using the keyword class to indicate it’s a class, 2nd followed by the keyword (the name of the class/design) and again the use of ( : ) to indicate that 3rd, it will follow a METHOD (remember from Tutorial 48, Functions in an Object Oriented Programming are called METHODS), 4th, followed by its logic or the condition/statements of the METHOD, i.e. what is it that the METHOD should do?, 5th, after which we CREATE THE VARIABLE (The object) that will be used as the argument in the METHOD of the CLASS, and 6th lastly CALL the Class’s Method for execution. · For example, we are creating a METHOD through CLASS and assigning HUMANS as variables and when each human is CALLED it will step forward and shout, Hello Sir! class human(): # Here we have created the CLASS by using the keyword, which is an OBJECT called human def shout(self): # Here we have defined its METHOD of which the object HUMAN is going to BEHAVE (function), in this example when called they will say Hello Sir! print('Hello Sir!') # The statement, i.e. what the VARIABLES are supposed to do when called upon ed=human() # Here we created new VARIABLES and assigned them as HUMAN dan=human() jon=human() human.shout(ed) # Here we are calling the CLASS by using its METHOD to pass the ARGUMENT to trigger the ACTION of saying Hello Sir! In other words we are saying; Hey Human, shout Hello Sir, you Ed human.shout(dan) human.shout(jon) jon.shout() # this is another way (a more common way) of CALLING the CLASS, as you can see we are simply saying - VARIABLE (ed) followed by the METHOD (shout) the ACTION of Hello Sir! ed.shout() dan.shout()
@shivamMishra2506
@shivamMishra2506 Жыл бұрын
Hey! Thanks you make it more crystal clear.
@lovelyarora808
@lovelyarora808 Жыл бұрын
👍👍
@pirobanda9150
@pirobanda9150 Жыл бұрын
Bro,this was really helpful!
@IamNavi7
@IamNavi7 4 жыл бұрын
BRO, THIS TYPE OF CLARITY I DIDN'T EVEN GET IN MY SCHOOL/COLLEGE TIME...YOU ARE INSANE AT TEACHING.....KEEP IT UP
@aashishmalhotra
@aashishmalhotra 3 жыл бұрын
What a great teacher he is , makes every concept crystal clear. I hope that you got blessed with KZbin algorithm so that your channel got recommended to each person who wants to learn coding.
@deanetim979
@deanetim979 2 жыл бұрын
You have really made the concept of OOP in Python less terrifying to me. I used to be afraid of it because I never understood what classes and objects were. Thank you!
@mohammadjadallah9813
@mohammadjadallah9813 3 жыл бұрын
I love your ‘method’ of teaching. You acknowledge how beginners don’t understand how this stuff works. So working your way back and making everything clear was very helpful. Thank you!
@ybpatil575
@ybpatil575 5 жыл бұрын
Dada, i took interest in learning python just cz of your way of teaching ! ..Mechanical engg. here . keep it up !!!
@brennanreedy3367
@brennanreedy3367 4 жыл бұрын
Thank you
@rajashreechaudhari3571
@rajashreechaudhari3571 4 жыл бұрын
@@brennanreedy3367 Why are you saying (str('Thank you'))?
@maybe9357
@maybe9357 4 жыл бұрын
@@rajashreechaudhari3571 🌚thank you is already in single quotes, so you don't need to define its type. And you didn't print the string😂
@chandrakantshinde6
@chandrakantshinde6 4 жыл бұрын
@@maybe9357 😂😂u got it
@nikileshjayaguptha3673
@nikileshjayaguptha3673 4 жыл бұрын
@@maybe9357 lol ya
@bishwadeepchatterjee2348
@bishwadeepchatterjee2348 5 жыл бұрын
It is rightly said that the best things come for free. Navin, you are an excellent teacher, the way you teach is brilliant enough for even a 10 year old kid to learn python. Thank you so much.
@sumantakumardutta986
@sumantakumardutta986 3 жыл бұрын
9:01 This is where Python and Java are similar. I love this course as Navin sir compares Python with Java at many instances to make things clear for students like me, who is switching from Java to Python. 😀🎉
@prasannakatre4040
@prasannakatre4040 2 жыл бұрын
Unrelated, but may I please ask why are your switching from Java to Python?
@ishankvaish1130
@ishankvaish1130 3 жыл бұрын
I don't think I have ever seen anybody enjoy teaching as much as he does! Thank you :)
@jasonzelin5351
@jasonzelin5351 Жыл бұрын
Never thought understanding the concept of class and objects would be so quick and easy. Thank you a lot!
@motivationinstinct
@motivationinstinct 4 жыл бұрын
This is the best python tutorial I found to be on youtube ! Thank you for the simple explanation and concepts.
@VarunKumar-qd5wl
@VarunKumar-qd5wl 5 жыл бұрын
Telusko meaning 'Learn' in Telugu.. Perfectly suited name.
@Medsainath
@Medsainath 4 жыл бұрын
Wow how do come to know bro? I was searching it's meaning for long time.
@crickettrendzz5477
@crickettrendzz5477 4 жыл бұрын
@@Medsainath 😂 Simple bro Our mother tongue is telugu 🤣🤣🤣
@Medsainath
@Medsainath 4 жыл бұрын
@@crickettrendzz5477 yaa I too know Telugu very well
@crickettrendzz5477
@crickettrendzz5477 4 жыл бұрын
@@Medsainath Ooh 😀 you've just joked as you doesn't know that meaning 😂
@Medsainath
@Medsainath 4 жыл бұрын
@@crickettrendzz5477 ha ha 😂 by the way wr do u live and which class r u
@adarshtiwari7395
@adarshtiwari7395 4 жыл бұрын
Hands down the best playlist to learn python. Navin you're doing a commendable job on this channel. All the very best and thank you for the content !
@sanyogpatial1819
@sanyogpatial1819 6 ай бұрын
I have been banging my head for 3 days to wrap my head around the concept of class, method ,objects their interplay in OOP after countless google search and you tube search this video saved a day for me by explaining each concept step by step in clear and concise way. Thanks a lot and more power to you. I firmly believe that “ there are no difficult concepts but only difficult explanations”.
@skviknesh
@skviknesh 4 жыл бұрын
Seriously Navin, A big Thank you! First place where I understood class completely
@raghav4858
@raghav4858 4 жыл бұрын
Hey when I use print(comp1.config()) My output is: i5,16gb,1TB None Ques:Why did this "None" come
@PavanKumar-by8dc
@PavanKumar-by8dc 4 жыл бұрын
@@raghav4858 if u use obj reference by calling class methods in print it shows you the none , because it expects the return
@aritroshome4443
@aritroshome4443 4 жыл бұрын
@@raghav4858 print returns void or None as config does not return anything but itself prints a line
@rahulra8358
@rahulra8358 4 жыл бұрын
Mass class sup
@yashsinghal7471
@yashsinghal7471 4 жыл бұрын
Shi kha..
@umeshpandey5226
@umeshpandey5226 4 жыл бұрын
One of the best oops tutorial on KZbin plateform...never seen before.....thank you very much to Naveen sir..
@shruts_thegirl
@shruts_thegirl 2 жыл бұрын
class shruti : def config(self) : print("how are you shruti") shru = shruti() shruti.config(shru)
@shruts_thegirl
@shruts_thegirl 2 жыл бұрын
class eleventh : def config(self) : print("omkar is topper of class") ele = eleventh() eleventh.config(ele)
@zakiasmaa6834
@zakiasmaa6834 3 ай бұрын
I wanted to take a moment to express my deepest gratitude for the incredible content you share on your KZbin channel. Your explanations are so clear and thoughtful that they make even the most complex topics easy to understand. I truly appreciate the time and effort you put into each video. From the bottom of my heart, thank you for being such an outstanding educator. You've made a significant impact on my learning journey, and I'm incredibly grateful to have come across your channel. Keep up the amazing work! Warm regards, Asmaa,
@KoreaRwkz
@KoreaRwkz 4 жыл бұрын
4:07 I believe the __main__ lets us know that the computer class is defined in the main file. If it were defined in another file, it would show the corresponding module name.
@sreekarg8648
@sreekarg8648 4 жыл бұрын
Does that mean one can have classes inside classes?
@pranav8701
@pranav8701 4 жыл бұрын
I visited first time this channel. Teaching skill ='WOW'.
@S0912S
@S0912S 3 жыл бұрын
It was a great session. I get easily confused every time I try to understand this concept and this really helped, thank you!
@karanb2067
@karanb2067 4 жыл бұрын
this concept was made so hard in an earlier bootcamp of python I took, Thank you for making it so much clear!
@krishnarout9176
@krishnarout9176 4 жыл бұрын
Thankyou sir, too teach for free. You are really a Great person With Great personality.
@rajeshSimpleton
@rajeshSimpleton 2 жыл бұрын
Adding to the 'self' reference int example: a=5 print(type(a)) #Output: int.bit_length(a) #Calling the int class's bit_length method for the int object a a.bit_length() #Calling the object's method without self reference
@shruts_thegirl
@shruts_thegirl 2 жыл бұрын
class subject : def config(self) : print("hi shruti") sub1 = subject() subject.config(sub1)
@mideroberts
@mideroberts 4 жыл бұрын
This video just de-mystified the concepts of "classes". I like how your examples are so relatable; that way I can have proper building blocks in my head. Kudos to you. I am definitley gonna look for more vidoes from you.
@johng5295
@johng5295 4 жыл бұрын
Thanks in a million. If you can explain like this to a child, it means you have mastered it. A+
@MovieBinge007
@MovieBinge007 4 жыл бұрын
Your videos are my new addiction Navin Sir!!!!
@abufarhaz2306
@abufarhaz2306 2 жыл бұрын
Bro, I was confused about python class for so long. It took 10 minutes probably for you to make it clear. You are great and so efficient.
@shubhamkothari2709
@shubhamkothari2709 5 жыл бұрын
Just loving the way you teach.You're making it so simple to understand.Thank you so much for all the time you put in for us people.Love ❤Keep up with it 🔥
@saderaj7636
@saderaj7636 4 жыл бұрын
Sir you are a better teacher
@smalirizvi8026
@smalirizvi8026 4 жыл бұрын
Navin bhai I LOVE YOU!! May God bless you. You are a gem in the world of educating and explaining
@rishikeshsawant
@rishikeshsawant 3 жыл бұрын
If you have come this far both you and navin(sir) are legend.
@el0150
@el0150 5 жыл бұрын
3:51 switch on the subtitles, you won't regret it
@psm876
@psm876 5 жыл бұрын
Awesome
@paristar3079
@paristar3079 5 жыл бұрын
Porn
@paristar3079
@paristar3079 5 жыл бұрын
You deserve millions of likes
@brennanreedy3367
@brennanreedy3367 4 жыл бұрын
ka ka ka ka ka ka
@sachinmaurya3259
@sachinmaurya3259 4 жыл бұрын
hahahahaahah
@sachinr6042
@sachinr6042 5 жыл бұрын
Your video editing further improves your explanation.
@khaben6986
@khaben6986 5 жыл бұрын
ur series are amazing they help to have a fast understanding of python ur incredible thank u ^^
@sriniub7594
@sriniub7594 5 жыл бұрын
we can use the below example also, it's working fine. class Computer1 : def configure(self): print("16 GB Ram, 500 GB Hard Disk, I5 Processor") comp1 = Computer1(); comp2 = Computer1(); comp1.configure(); comp2.configure();
@Dhananjoybhatta123
@Dhananjoybhatta123 4 жыл бұрын
I heard about the "class" thing in programming. But I got to understand when I watched your video.Thank you so much. By the way sir, I'm have completed my 12th only, couldn't complete my grad. But I was always interested in coding. After watching your video I am willing to work on a real-time project. Thanks for your way of teaching. I want to learn more from you.
@ThamizhpriyaM
@ThamizhpriyaM 10 ай бұрын
Thanks a lot Mr. Naveen Reddy. Finally, I understood the concept of classes and object.
@rohit-2427
@rohit-2427 4 жыл бұрын
Lucky to find this channel I've been searching randomly for python tutorials and I found this channel and gone through the videos and you know what's next😎😎 addicted to his teaching 😉
@abhishekjadhav9289
@abhishekjadhav9289 4 ай бұрын
Thank you for the great tutorial. In simple words I will say, you are the best tutor for Python because you can breakdown the hardest concepts in Python into very easy to understand explanation which is so easy for students of any level of understanding..
@rotrose7531
@rotrose7531 6 жыл бұрын
Sir, please come up with another series because your explanation is excellent and that helps accelerating our understanding, do not know what to do once 62 lessons are done.
@nileshthombre6253
@nileshthombre6253 6 жыл бұрын
I'm new in this industry, after watching at least 4-5 times. I able to understand Thanks :)
@lokeshmadiga6215
@lokeshmadiga6215 4 жыл бұрын
Great i am new for OOPS l think i will learn lot more from your videos
@Stay.Strong.Keep.Moving
@Stay.Strong.Keep.Moving 3 жыл бұрын
Awesome one! Much intuitively explained in contrast with a number of other places I tried. Went straight in. Looking forward to watching a great explanation again in lecture #50. Thanks Navin!
@bartekkowalski8393
@bartekkowalski8393 3 жыл бұрын
I love your teaching style. Thanks from Canada
@codewithalien
@codewithalien 4 жыл бұрын
Your presentation skills are really good.The way you teach the basic concepts of any topic is unique.
@worldofcharisma3723
@worldofcharisma3723 Жыл бұрын
Wow! So awesome.... You are truely a day saver.....
@pavan5208
@pavan5208 2 жыл бұрын
best tutorial I came across to understand about Classes in python. Thank you!
@thedestructor3505
@thedestructor3505 3 жыл бұрын
Way easier to understand than any other online platforms ❤️❤️
@deepanshudutta4443
@deepanshudutta4443 4 жыл бұрын
Sir,your teaching style is just amazing and cool..I understood all the things very well.....
@bhavana333
@bhavana333 4 жыл бұрын
Awesome explanation. I am learning oops concepts first time and this kind of base i expected. Thanks so much . Really helpful.
@rayan4203
@rayan4203 4 жыл бұрын
Hi, Navin Reddy, you did wonderful work. i am really thankful to you for providing us a Python learning information.
@anuj702
@anuj702 4 жыл бұрын
wow I have seen so many online videos but u r the best one to explain
@debolinamajumdar
@debolinamajumdar 4 жыл бұрын
I cannot thank you enough for these sessions. So so amazingly explained .
@shamstabrez2986
@shamstabrez2986 4 жыл бұрын
Hiii debolina
@abhishekbhardwaj3177
@abhishekbhardwaj3177 4 жыл бұрын
Sir, at 5:09 you say that don't use built-in class name as a name for your custom class, it will give error. I make classes named as 'int', 'float', 'str'. But my code works fine. The code as follows: class str: def msg(self): print("Good Evening... Have a great future ahead.") def check(self,obj): print(self is obj) a = str() a.msg() Output: Good Evening... Have a great future ahead. Big thumbs up for your great explaination. Reply soon sir.
@siddharthmodi5908
@siddharthmodi5908 4 жыл бұрын
Thank you sir for providing best python classes , your teaching skills are beyond perfect
@bangbinbash
@bangbinbash Жыл бұрын
Wow stumbled upon this video and it's easily the best explanation of class/object I've ever seen 😮
@Sarajshares
@Sarajshares 3 жыл бұрын
If I were to teach like you, I would feel like the greatest teacher in the world🤫
@tingli8300
@tingli8300 5 жыл бұрын
U r so awesome to sort it out my problems,thank you so much!!!!!!! For a fresh programmer, you r the best ever youtuber and educator for sharing the knowledge !!!!!!
@lynx0808
@lynx0808 2 жыл бұрын
I have watched so many videos on classes and this is the one i needed! Thank you
@AutusDeletus98
@AutusDeletus98 4 жыл бұрын
i love your analogy. It makes the concept way easier.
@hetalpandya6137
@hetalpandya6137 4 жыл бұрын
Here i understood the class clearly ..and why everything in python is object ..
@xyzfusic3359
@xyzfusic3359 3 жыл бұрын
Literally best teacher 🙏🏻♥️✨
@ErebusShorts
@ErebusShorts Жыл бұрын
your english is really fluent 👍👍
@danielworkneh3608
@danielworkneh3608 5 жыл бұрын
you are so nice at explaining the idea. I wish you were my teacher!!!!!!!!!
@BrighterWay
@BrighterWay 5 жыл бұрын
I have learn Oop before but I never understand that as you teach me. One Of The best Teacher I have ever mate, Just Awesome Video👍👍.You are Doing Great
@atulayagupta785
@atulayagupta785 4 жыл бұрын
Very clear explanation for beginners, Thanks
@MUNA116ful
@MUNA116ful 3 жыл бұрын
Your way of explaining is just AWESOME. Thank you so much.
@debakamalhazarika7097
@debakamalhazarika7097 3 жыл бұрын
Sir , your way of approaching is good. I learned python upto an intermediate level..but wanted to go further and here your videos are helping me a lot. Its very systematic with reasoning, "why" , "how" and "when" to use all these. Just can you elaborate about "class" with some definitions .Thank You
@yogeshraja1481
@yogeshraja1481 5 жыл бұрын
guys, mostly no one can understand easily. after watching at the end of the video, again re-play this video, then can understand. navin jii..awesome...
@sanketjori1981
@sanketjori1981 3 жыл бұрын
okay so finally i am cleared what classes and objects actually thank you so much sir
@karatugba
@karatugba 3 жыл бұрын
whenever I watch ur videos my mood is goin up up up :D
@divyasangamreddi8127
@divyasangamreddi8127 4 жыл бұрын
i am regretiing that y havent i watched earlier your vedios are awsome...........
@karan0611
@karan0611 Жыл бұрын
I had seen many videos but your video made me understand very well Thank you a lot!
@lakshmisravyak5517
@lakshmisravyak5517 4 жыл бұрын
oh my god you are awesome sir!!!!you made me to understand the concept which i am struggling to understand for a week ,tq for the effort you put in
@muhammadkarim4231
@muhammadkarim4231 3 жыл бұрын
The best tutorial on classes
@jaswantdn7
@jaswantdn7 3 жыл бұрын
I have been looking for a solution to my problem. finally, I got one. Thank you, sir.
@PavanKumar-by8dc
@PavanKumar-by8dc 4 жыл бұрын
We can also use obj reference like, Comp1.config() .. without using parameters
@Nikhil-qi4oz
@Nikhil-qi4oz 6 жыл бұрын
class c1 extends object field i field j method initialize (x) begin set i = x; set j = -(0,x) end method countup (d) begin set i = +(i,d); set j = -(j,d) end method getstate () list(i,j) let t1 = 0 t2 = 0 o1 = new c1(3) in begin set t1 = send o1 getstate(); send o1 countup(2); set t2 = send o1 getstate(); list(t1,t2) end
@akashpoudel571
@akashpoudel571 5 жыл бұрын
sir as a first timmer its my boon to learn frm u........ u r a cool explainer.....
@Pranavryan
@Pranavryan 4 жыл бұрын
C=computer() C.config() This was the easiest thread for me
@oborraacademy5613
@oborraacademy5613 3 жыл бұрын
I had many doubts in class but your explanation was so helpful and I liked it a lot. Thank UUUUU😀😃😃
@omaral-bakri2656
@omaral-bakri2656 6 жыл бұрын
You mad coding looks sooo much easier. Thanks a lot !
@ebabu7485
@ebabu7485 4 жыл бұрын
this is awesome navin the way you are explaning ....love the way you teach with practicals ....gone through so many websites ..but this is all time best one
@pankhudiseth
@pankhudiseth 4 жыл бұрын
Love your unique examples! Keep going!
@maheswarisadhu5102
@maheswarisadhu5102 6 жыл бұрын
ur teaching skills are excellent sir giving knowledge by correct way.thank u so much sir
@054_ritesh3
@054_ritesh3 4 жыл бұрын
Extremely wonderful series
@charanbathula984
@charanbathula984 3 жыл бұрын
8:21 is best explanation
@sateeshkumar-h9w
@sateeshkumar-h9w 9 ай бұрын
Hi sir, first of all, Thank you so much for making the lectures on python concepts which are very clear to understand. Here i got 2 doubts, first one is, are variables and objects both same?? Second doubt is, are classes and data type same?? i understand it looks silly. Don't mind for these.
@kiran-qs5pu
@kiran-qs5pu 4 жыл бұрын
him: Hey kiran, walk! me: *frowns*
@zavier9788
@zavier9788 3 жыл бұрын
*still frowning*
@अभयदीप-ज1ग
@अभयदीप-ज1ग 17 сағат бұрын
राधे राधे गौ माता जी जय गुरू भगवान माता पिता जी सदा जय ❤🎉
@sufiyanmogal1527
@sufiyanmogal1527 2 жыл бұрын
Thank you sir the class and object topic is hard but u explain these in easyway
@tirlangiram3971
@tirlangiram3971 5 жыл бұрын
Manchi videos bro, Baga chepputhunaaru
@suryaganeshpindiprolu472
@suryaganeshpindiprolu472 3 жыл бұрын
The you explained is just amazing. I wouldn't be able to understand this concept without you🖤
@rajibguha6960
@rajibguha6960 5 жыл бұрын
again style of teaching fantastic..
@iammiban
@iammiban 2 жыл бұрын
Thankyou So much for making learning so easy and bite-sized
#50 Python Tutorial for Beginners | __init__ method
6:46
Telusko
Рет қаралды 675 М.
Python As Fast as Possible - Learn Python in ~75 Minutes
1:19:41
Tech With Tim
Рет қаралды 1,8 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 13 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 30 МЛН
Object Oriented Programming with Python - Full Course for Beginners
2:12:35
freeCodeCamp.org
Рет қаралды 1,9 МЛН
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 310 М.
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,4 МЛН
#32 Python Tutorial for Beginners | Functions in Python
11:13
Telusko
Рет қаралды 1 МЛН
C++ CLASSES & OBJECTS explained easy 🧍
10:54
Bro Code
Рет қаралды 33 М.
Classes and Objects with Python - Part 1 (Python Tutorial #9)
11:36
OOP in Python | Object Oriented Programming
1:45:19
Telusko
Рет қаралды 1,8 МЛН
快乐总是短暂的!😂 #搞笑夫妻 #爱美食爱生活 #搞笑达人
00:14
朱大帅and依美姐
Рет қаралды 13 МЛН