Object-oriented Programming (OOP) in Python (Easy to Understand Guide) #20

  Рет қаралды 213,538

Programiz

Programiz

Күн бұрын

Пікірлер: 179
@programizstudios
@programizstudios 2 жыл бұрын
🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges. Try Programiz PRO: bit.ly/right-python
@Wrennvy
@Wrennvy 3 жыл бұрын
class Triangle: def __init__(self, a, b, c): self.a = a self.b = b self.c = c def perimeter(self): p = [self.a, self.b, self.c] h = sum(p) return h t1 = Triangle(3, 4, 5) result = t1.perimeter() print(result)
@stephelisabeth3143
@stephelisabeth3143 3 жыл бұрын
In my Python class, it has been hard to understand what you might actually use a class for and how it would be applied. I assumed it had to do with organization but it was hard for me to come up with specific instances and my professor honestly hasn't demonstrated that for us. You made it obvious in two seconds and it will make doing my assignments easier going forward. Thank you for that.
@ravi2971
@ravi2971 4 жыл бұрын
the clearest and most well-explained video on classes on KZbin! Keep up the good work man!
@cerealkurus
@cerealkurus 3 жыл бұрын
Trueeee
@bilkisabe1660
@bilkisabe1660 Жыл бұрын
Very true
@ndemazizou9866
@ndemazizou9866 Жыл бұрын
True
@anj6912
@anj6912 6 ай бұрын
Totally agree!
@enzy6434
@enzy6434 2 жыл бұрын
I’ve watched Python tutorial videos from pretty much all content creators worth anything and this guy is by far the best overall at teaching concepts in a clear and understandable manner.
@del_f_s_1051
@del_f_s_1051 Жыл бұрын
I am a python beginner learner. I watched a bunch of videos on KZbin but couldn't understand the concept of OOP. This video is an absolute gem. Thank you sir, in just 18 mins every part covered in the video was crystal clear. God bless. 😊
@abhishekghosh5550
@abhishekghosh5550 2 жыл бұрын
hey i bought one course of a popular python instructor. couldn't understand that and came here. and got crystal clear man! this is incredible. and here, i was pulling my hair off as to where am i going wrong. Cheers.
@dots223_
@dots223_ 3 жыл бұрын
Finally, a video that clearly explains classes. Thank you!
@peterchin6759
@peterchin6759 3 жыл бұрын
Oh man!!!!!! The most concise explanation I have ever heard/ read. The only regret I had was that I couldn't discover your videos sooner.
@HamzaAli-iy3ws
@HamzaAli-iy3ws 4 жыл бұрын
You are doing such a great work by helping us in learning python and with such an ease. Keep it up and wish you a great success!!!
@muhaiminulhasanadiyan5948
@muhaiminulhasanadiyan5948 Жыл бұрын
class triangle: def __init__(self,a,b,c): self.side1=a self.side2=b self.side3=c def perimeter(self): return f"The perimeter of the triangle is {self.side3+self.side2+self.side1}" triangle1=triangle(3,4,5) perimeter1=triangle1.perimeter() print(perimeter1)
@rithikrishik5174
@rithikrishik5174 3 жыл бұрын
class Triangle: def __init__(self,a,b,c): self.side1=a self.side2=b self.side3=c def Perimeter(self): p=self.side1+self.side2+self.side3 return p T1=Triangle(3,4,5) print(T1.Perimeter())
@mdiftekhar6876
@mdiftekhar6876 3 жыл бұрын
class triangle: def __init__(self, a, b, c): self.a = a self.b = b self.c = c def add(self): return self.a + self.b + self.c tri1=triangle(3,4,5) print(tri1.add()) tri2=triangle(7,8,9) print(tri2.add()) tri3=triangle(2,3,6) print(tri3.add())
@serpentinefireball
@serpentinefireball 3 жыл бұрын
This is amazing! I watched quite a few tutorials on this topic before I found your video and none of them helped me understand the concept the way you did as a total beginner. Thank you!
@Another_Username-s9d
@Another_Username-s9d 3 жыл бұрын
One of the best tutorials. I also like that you actually added a task at the end to check if we really understand
@zainkhatri5030
@zainkhatri5030 3 жыл бұрын
i love you pundit, everytime i have struggle i come to you and you always execute. love from uzebekistan - jamal
@Huyautomation2901
@Huyautomation2901 Жыл бұрын
I've spent at least 3 days to figure out what the hell are "classes and object" in Python.Wow God blessed me found your video.That's very clear now I totally understand them.Thank you so much ! You got my like button and share
@kawaiikina3618
@kawaiikina3618 2 жыл бұрын
Huge thanks to Programiz team! I can see you guys have devoted a lot of effort into this video. Your script is the most concrete, clearest and easiest to understand. The step by step guidance also lays out the logics clearly and allows beginners to succeed in the programming task later, which is rarely seen in other tutorials. You are great python teachers!
@forrestt1294
@forrestt1294 3 жыл бұрын
The Blueprint-House analog helped me. Your teaching employs common-sense. Common-sense isn't very common. This is the best Class/Object video on the net. Thank you for taking the time to make this video!
@Lekan-i1c
@Lekan-i1c 8 ай бұрын
A lot of people must have said thank you but I will like to say it again. Thank you!
@tanmayparekh3371
@tanmayparekh3371 2 жыл бұрын
I have watched many videos but trust me this video is the best i have ever seen.
@sumanhere99
@sumanhere99 3 жыл бұрын
I just love your way of teaching..it makes everything clear to me.
@Buckybarnesfan22
@Buckybarnesfan22 2 жыл бұрын
A true master. I have watched your video many times. It is an extremely clear and concise way to teach OOP. Thank you!
@kamalelbo5116
@kamalelbo5116 3 жыл бұрын
it's the best video explaining classes and OOP, good methodology and very good job,thanks
@seshasai7348
@seshasai7348 2 жыл бұрын
Hi bro. Actually I was learning python since 1 month. Since one month what I learnt I never felt confused but today I was confused particularly this concept. Anyway I really thank full your concepts which you brought on screen to make help us.
@DigitalAcademyOnline
@DigitalAcademyOnline 3 жыл бұрын
Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels
@MrStarmat
@MrStarmat 3 жыл бұрын
very clear, thank you very much ! As a newbie as me, concrete examples with step by step explanation on python is very helpfull to get the concept of OOP.
@Adinasa2
@Adinasa2 3 жыл бұрын
class Triangle: def __init__(self,a,b,c): self.a = a self.b = b self.c = c def perimeter(self): sum = self.a + self.b + self.c return sum t1 = Triangle(3,4,5) print(t1.perimeter())
@SoSha_Tv
@SoSha_Tv 2 жыл бұрын
Thank you so so much for breaking Class down to be understandable. I am indeed grateful.
@yashtiwari00008
@yashtiwari00008 3 жыл бұрын
This video cleared all my doubts, thank you so much, you taught very well
@MGrace01
@MGrace01 3 жыл бұрын
class triangle: def __init__ (self,a,b,c): self.a = a self.b = b self.c = c def calculate_perimeter(self): sides = [self.a,self.b,self.c] return sum(sides) first_triangle = triangle(3,4,5) print(first_triangle.calculate_perimeter())
@Niko_Dola
@Niko_Dola Жыл бұрын
This is was the most useful tutorial for classes and objects , thank you!
@samiicosta
@samiicosta 2 жыл бұрын
I was reading the Python official tutorial, which is great. But this video made it SO MUCH clearer! Thank you for the lesson. Keep up the good work.
@jeffnc
@jeffnc 3 жыл бұрын
Thank you this was very useful. I liked that you include an exercise at the end too, I feel I have a much better understanding now :)
@MoonLi8th
@MoonLi8th 3 жыл бұрын
class triangle: def __init__(self, a=0, b=0, c=0): self.side1 = a self.side2 = b self.side3 = c def calculating(self): perimeter = self.side1 + self.side2 + self.side3 return perimeter T1 = triangle(3, 4, 5) print(T1.calculating())
@hawaiiankickboxer
@hawaiiankickboxer 2 жыл бұрын
FINALLY!!! ....An Indian I can understand. Awesome video!
@vengalrao5772
@vengalrao5772 3 жыл бұрын
I got understand after many days 🙏❤️...but love this 💙💙💙
@fadilyassin4597
@fadilyassin4597 3 жыл бұрын
well done very good I like the way you explained sttributes as variables and methods as functions it is important to define words first because it removes the confusion of names thanks again
@sainath2848
@sainath2848 4 жыл бұрын
Thank you... Now I got clarity on OOP
@PerrySullivan
@PerrySullivan 2 жыл бұрын
Legit tysm. Thank god I started taking notes on videos outside of my class. Watched this vid like several weeks ago and I wrote down code about the "Complex" number problem and little did I know, a similar problem like that would appear on my midterm (that I'm taking rn at the time of this comment).
@vishnug16
@vishnug16 2 жыл бұрын
You the awesome trainer for this course in youtube platform ,really you explained all the topics with theory and code. Keep going on
@thiernoba
@thiernoba 2 жыл бұрын
Well done. Very composed and well explained. I finally get it. This seemed like expert stuff for me for a long time, but not anymore. Don't change your tone because, In some other videos, the instructors act like they have to speak fast to come out as they know their stuff.
@lemikanadeola7442
@lemikanadeola7442 2 жыл бұрын
this is the best video i have learnt from, and besides... your smile helps understand it better. thanks a lot for the explanation. keep the good work🥰.
@sudhamjayanthi
@sudhamjayanthi 4 жыл бұрын
Love the website and tutorials! High-quality content 👌
@kyawswarthant708
@kyawswarthant708 3 жыл бұрын
I am your fan now! Regret that I should check this simplest version first : )Thanks A Lot
@independent7212
@independent7212 3 жыл бұрын
Keep it up sir... your way of expression and methods are amazing
@gbolagadeolajide8595
@gbolagadeolajide8595 2 жыл бұрын
This was an excellent video. It explained creation of objects so well. Thank you so much
@rashmihiremath191
@rashmihiremath191 2 жыл бұрын
I am glad I came across your channel , you explain in a very simple way . Way to go , keep rocking
@jacknapster5693
@jacknapster5693 3 жыл бұрын
class triangle: def __init__(self,a,b,c): self.a=a self.b=b self.c=c def perimeter(self): p=self.a+self.b+self.c return p t1=triangle(1,2,3) t2=triangle(4,5,6) p1=t1.perimeter() p2=t2.perimeter() print(f"Perimeter for first triangle = {p1}") print(f"Perimeter for second triangle = {p2}")
@nethravathi2845
@nethravathi2845 2 жыл бұрын
The concept is explained very clearly.. 😊
@blindhydra
@blindhydra 3 жыл бұрын
Great video! You are very skillful at teaching the information and progressing the difficulty, loved the video!! Thank you very much
@ramonashiah9636
@ramonashiah9636 3 жыл бұрын
I am still confused on the [15:27] line 14, the way we called the add method...
@TheTenorChannel
@TheTenorChannel 2 жыл бұрын
Great video. Wish you the best & success!!
@Qamar92
@Qamar92 4 ай бұрын
What the hell is my instructor explaining for past lecture and tutorial session? I watch this videos and everythings clicked for less than 2 minutes. Thank you for this.
@chinecheremchima-w1e
@chinecheremchima-w1e Жыл бұрын
Thanks for making this video, and also for the mobile app.
@oluwafemionatolu1286
@oluwafemionatolu1286 2 жыл бұрын
class triangle: def __init__(self, side1,side2,side3): self.side1 = side1 self.side2 = side2 self.side3 = side3 def cal_perimeter(self): p = self.side1+self.side2+self.side3 print (p) t1 = triangle(4,7,6) t1.cal_perimeter()
@danielkiriggwajjo27
@danielkiriggwajjo27 2 жыл бұрын
thanks buddy it was fantastic
@duncanmwangi3468
@duncanmwangi3468 3 жыл бұрын
Thank you Sir ,You are a good teacher clearly explained
@tanvimutha4049
@tanvimutha4049 4 жыл бұрын
Very well explained! Thank you for great work.Can't wait for the upcoming videos.
@edulel
@edulel 3 жыл бұрын
Excellent and very clear explanation of classes in Python!!!! I will suggest using different names of variables inside and outside of the class (result) to better understand the examples. Thank you!!!
@kaila-annguiste1472
@kaila-annguiste1472 2 жыл бұрын
so clear and easy to understand quick!
@kumarprmshvm565
@kumarprmshvm565 3 жыл бұрын
Your Videos are awesome, Man. Maybe it is not know to many.. I strongly believe you will succeed in u r mission
@kajalchandravanshi2456
@kajalchandravanshi2456 3 жыл бұрын
I found this very useful. Thankyou so much sir.😊😊 plzz keep uploading these kind of videos cause it will help a lot of students who are in search of crystal clear concepts with good examples.
@frankharrigan5368
@frankharrigan5368 2 жыл бұрын
Thank you so much for explaining OOP in such an easy to understand way. You've been a great help. I've subscribed to your channel.
@NARASIMHAM1002
@NARASIMHAM1002 4 жыл бұрын
Great work! Keep up the spirit and this channel will grow very soon.
@hemre1913
@hemre1913 4 жыл бұрын
your web site and videos are so explanatory!! thank you :)
@famijoku7631
@famijoku7631 3 жыл бұрын
thanks, I finally understood it now
@Nancivlog
@Nancivlog 3 жыл бұрын
very clear... i hve subscribed keep up the good work
@John-eq5cd
@John-eq5cd 3 жыл бұрын
Very clear, well worth watching. Thank you
@creativecodz
@creativecodz 3 жыл бұрын
superb classes sir. thanks for making such amazing python class videos. one request sir if possible please make videos on real-time projects with explanations for beginners. so that we will be more confident in programming. once again thanks a million sir
@abusufian7848
@abusufian7848 4 жыл бұрын
wonderful!!! Love from Bangladesh, Brother!!!
@gabrielnino2892
@gabrielnino2892 4 жыл бұрын
This is so helpful! thank you!
@sarahooshmand1830
@sarahooshmand1830 3 жыл бұрын
Thank you, this video is so helpful and easy to understand
@haraldurkarlsson1147
@haraldurkarlsson1147 3 жыл бұрын
Very clear videos. These concepts can be quite confusing (because of all the code jargon that programmers use).
@seanhoran5014
@seanhoran5014 Жыл бұрын
I'm lost on this one, great course thus far but somehow went to another level without any defining on how you got there with this one.
@JH-KU
@JH-KU 3 жыл бұрын
Thank you. very well organized and explained. Well done.
@pavaraliyanage93
@pavaraliyanage93 3 жыл бұрын
thank you, sir interesting and very helpful for me
@pakistan3965
@pakistan3965 Жыл бұрын
Sir! what is self and why we use itm
@ilyadgreyrat5322
@ilyadgreyrat5322 Жыл бұрын
class Triangle: def __init__(self, a, b, c): self.a = a self.b = b self.c = c pass def perimeter(self): return (self.a+self.b+self.c) t1 = Triangle(3, 4, 5) print(t1.perimeter())
@riadasgupta2737
@riadasgupta2737 2 жыл бұрын
very simple and to the point... thanks for making the concept easier
@sucharithaanumula1849
@sucharithaanumula1849 3 жыл бұрын
Awesome explanation
@LostHaven
@LostHaven 4 жыл бұрын
Very easy to follow, thanks for explaining!
@Studywithmelilac
@Studywithmelilac 3 жыл бұрын
Very clear! Thank you so much sir
@zubaidahsabah7948
@zubaidahsabah7948 2 жыл бұрын
very well explained
@sanyamjain4777
@sanyamjain4777 4 жыл бұрын
The way you explain ❤️
@sharanchandrasekaran8399
@sharanchandrasekaran8399 10 ай бұрын
Great video, thank you
@ashisdas5376
@ashisdas5376 4 жыл бұрын
I was waiting for it
@harshad9203
@harshad9203 2 жыл бұрын
Hi, I have modified the code by a bit by asking the values of each side to count the perimeter instead of asigning it so the code is here class Triangle: def __init__(self,a,b,c): self.a = a self.b = b self.c = c def perimeter(self): perimeter_nums = [self.a,self.b,self.c] perimeter_value = sum(perimeter_nums) return perimeter_value value1 = int(input("Enter the first value: ")) value2 = int(input("Enter the second value: ")) value3 = int(input("Enter the third value: ")) result = Triangle(value1,value2,value3).perimeter() print("The perimeter of your given Tiriangle is", result)
@ashishkarsh5817
@ashishkarsh5817 2 жыл бұрын
Where to get the solutions??? Of the task you gave
@mathewschibesa9793
@mathewschibesa9793 2 жыл бұрын
Great Video bro!!!!
@jabezs.1913
@jabezs.1913 Жыл бұрын
It was a wonderful one😜😜
@saurabhvaishya3896
@saurabhvaishya3896 3 жыл бұрын
I AM ON JUST 3RD MIN OF THE VIDEO BUT STILL, IT FEELS LIKE BEST OF ALL
@rajwalavalkar7208
@rajwalavalkar7208 3 жыл бұрын
couta>>b>>c; sir, what is equivalent python code for this c++ code? plz reply!
@laoying20
@laoying20 3 жыл бұрын
Thanks it was very good.
@derikaem8021
@derikaem8021 3 жыл бұрын
great explanation! is there a way to have several init functions, so that you can construct an object with a variable number of attributes?
@adireddy4710
@adireddy4710 2 жыл бұрын
Just Awesome and super interestingly genuine way of teaching...So thankful to u brother..also please post videos on data science or AI related too if u can ..thank you
@riyashrestha3483
@riyashrestha3483 4 жыл бұрын
It is here!!!
@vikramd9414
@vikramd9414 3 жыл бұрын
Very useful & excellent teaching👑
@pauloaalcantra1187
@pauloaalcantra1187 3 жыл бұрын
#Triangle Object class Triangle: def __init__(self, a, b, c): self.a = a self.b = b self.c = c def isTriangle(self): return (self.a + self.b) > self.c and (self.a + self.c) > self.b and (self.b + self.c) > self.a def isRightTriangle(self): a1 = max(self.a, self.b, self.c) c1 = min(self.a, self.b, self.c) b1 = sum([self.a, self.b, self.c]) - (a1 + c1) return a1**2 == sum([b1**2, c1**2]) def perimeter(self): return self.a + self.b + self.c def area(self): #heron's formula p = self.perimeter()/2 return (p*(p-self.a)*(p-self.b)*(p-self.c))**0.5
@rossanapessano5432
@rossanapessano5432 2 жыл бұрын
Better than my teacher
Python Inheritance (Make Your Code Modular!) #22
14:52
Programiz
Рет қаралды 58 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 144 М.
Object Oriented Programming (OOP) in Python
46:37
Traversy Media
Рет қаралды 283 М.
Python Functions (The Only Guide You'll Need) #12
16:57
Programiz
Рет қаралды 613 М.
Avoid These BAD Practices in Python OOP
24:42
ArjanCodes
Рет қаралды 79 М.
Object Oriented Programming (OOP) in C++ Course
1:30:26
freeCodeCamp.org
Рет қаралды 2,6 МЛН
Lists & Tuples in Python (How to Use Them Effectively?) #15
19:29
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,4 МЛН
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,3 МЛН
Intro to Object Oriented Programming - Crash Course
30:18
freeCodeCamp.org
Рет қаралды 983 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН