🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges. Try Programiz PRO: bit.ly/right-python
@Wrennvy3 жыл бұрын
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)
@stephelisabeth31433 жыл бұрын
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.
@ravi29714 жыл бұрын
the clearest and most well-explained video on classes on KZbin! Keep up the good work man!
@cerealkurus3 жыл бұрын
Trueeee
@bilkisabe1660 Жыл бұрын
Very true
@ndemazizou9866 Жыл бұрын
True
@anj69126 ай бұрын
Totally agree!
@enzy64342 жыл бұрын
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 Жыл бұрын
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. 😊
@abhishekghosh55502 жыл бұрын
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_3 жыл бұрын
Finally, a video that clearly explains classes. Thank you!
@peterchin67593 жыл бұрын
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-iy3ws4 жыл бұрын
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 Жыл бұрын
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)
@rithikrishik51743 жыл бұрын
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())
@mdiftekhar68763 жыл бұрын
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())
@serpentinefireball3 жыл бұрын
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-s9d3 жыл бұрын
One of the best tutorials. I also like that you actually added a task at the end to check if we really understand
@zainkhatri50303 жыл бұрын
i love you pundit, everytime i have struggle i come to you and you always execute. love from uzebekistan - jamal
@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
@kawaiikina36182 жыл бұрын
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!
@forrestt12943 жыл бұрын
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-i1c8 ай бұрын
A lot of people must have said thank you but I will like to say it again. Thank you!
@tanmayparekh33712 жыл бұрын
I have watched many videos but trust me this video is the best i have ever seen.
@sumanhere993 жыл бұрын
I just love your way of teaching..it makes everything clear to me.
@Buckybarnesfan222 жыл бұрын
A true master. I have watched your video many times. It is an extremely clear and concise way to teach OOP. Thank you!
@kamalelbo51163 жыл бұрын
it's the best video explaining classes and OOP, good methodology and very good job,thanks
@seshasai73482 жыл бұрын
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.
@DigitalAcademyOnline3 жыл бұрын
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
@MrStarmat3 жыл бұрын
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.
@Adinasa23 жыл бұрын
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_Tv2 жыл бұрын
Thank you so so much for breaking Class down to be understandable. I am indeed grateful.
@yashtiwari000083 жыл бұрын
This video cleared all my doubts, thank you so much, you taught very well
@MGrace013 жыл бұрын
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 Жыл бұрын
This is was the most useful tutorial for classes and objects , thank you!
@samiicosta2 жыл бұрын
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.
@jeffnc3 жыл бұрын
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 :)
@MoonLi8th3 жыл бұрын
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())
@hawaiiankickboxer2 жыл бұрын
FINALLY!!! ....An Indian I can understand. Awesome video!
@vengalrao57723 жыл бұрын
I got understand after many days 🙏❤️...but love this 💙💙💙
@fadilyassin45973 жыл бұрын
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
@sainath28484 жыл бұрын
Thank you... Now I got clarity on OOP
@PerrySullivan2 жыл бұрын
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).
@vishnug162 жыл бұрын
You the awesome trainer for this course in youtube platform ,really you explained all the topics with theory and code. Keep going on
@thiernoba2 жыл бұрын
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.
@lemikanadeola74422 жыл бұрын
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🥰.
@sudhamjayanthi4 жыл бұрын
Love the website and tutorials! High-quality content 👌
@kyawswarthant7083 жыл бұрын
I am your fan now! Regret that I should check this simplest version first : )Thanks A Lot
@independent72123 жыл бұрын
Keep it up sir... your way of expression and methods are amazing
@gbolagadeolajide85952 жыл бұрын
This was an excellent video. It explained creation of objects so well. Thank you so much
@rashmihiremath1912 жыл бұрын
I am glad I came across your channel , you explain in a very simple way . Way to go , keep rocking
@jacknapster56933 жыл бұрын
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}")
@nethravathi28452 жыл бұрын
The concept is explained very clearly.. 😊
@blindhydra3 жыл бұрын
Great video! You are very skillful at teaching the information and progressing the difficulty, loved the video!! Thank you very much
@ramonashiah96363 жыл бұрын
I am still confused on the [15:27] line 14, the way we called the add method...
@TheTenorChannel2 жыл бұрын
Great video. Wish you the best & success!!
@Qamar924 ай бұрын
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 Жыл бұрын
Thanks for making this video, and also for the mobile app.
Thank you Sir ,You are a good teacher clearly explained
@tanvimutha40494 жыл бұрын
Very well explained! Thank you for great work.Can't wait for the upcoming videos.
@edulel3 жыл бұрын
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-annguiste14722 жыл бұрын
so clear and easy to understand quick!
@kumarprmshvm5653 жыл бұрын
Your Videos are awesome, Man. Maybe it is not know to many.. I strongly believe you will succeed in u r mission
@kajalchandravanshi24563 жыл бұрын
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.
@frankharrigan53682 жыл бұрын
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.
@NARASIMHAM10024 жыл бұрын
Great work! Keep up the spirit and this channel will grow very soon.
@hemre19134 жыл бұрын
your web site and videos are so explanatory!! thank you :)
@famijoku76313 жыл бұрын
thanks, I finally understood it now
@Nancivlog3 жыл бұрын
very clear... i hve subscribed keep up the good work
@John-eq5cd3 жыл бұрын
Very clear, well worth watching. Thank you
@creativecodz3 жыл бұрын
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
@abusufian78484 жыл бұрын
wonderful!!! Love from Bangladesh, Brother!!!
@gabrielnino28924 жыл бұрын
This is so helpful! thank you!
@sarahooshmand18303 жыл бұрын
Thank you, this video is so helpful and easy to understand
@haraldurkarlsson11473 жыл бұрын
Very clear videos. These concepts can be quite confusing (because of all the code jargon that programmers use).
@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-KU3 жыл бұрын
Thank you. very well organized and explained. Well done.
@pavaraliyanage933 жыл бұрын
thank you, sir interesting and very helpful for me
@pakistan3965 Жыл бұрын
Sir! what is self and why we use itm
@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())
@riadasgupta27372 жыл бұрын
very simple and to the point... thanks for making the concept easier
@sucharithaanumula18493 жыл бұрын
Awesome explanation
@LostHaven4 жыл бұрын
Very easy to follow, thanks for explaining!
@Studywithmelilac3 жыл бұрын
Very clear! Thank you so much sir
@zubaidahsabah79482 жыл бұрын
very well explained
@sanyamjain47774 жыл бұрын
The way you explain ❤️
@sharanchandrasekaran839910 ай бұрын
Great video, thank you
@ashisdas53764 жыл бұрын
I was waiting for it
@harshad92032 жыл бұрын
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)
@ashishkarsh58172 жыл бұрын
Where to get the solutions??? Of the task you gave
@mathewschibesa97932 жыл бұрын
Great Video bro!!!!
@jabezs.1913 Жыл бұрын
It was a wonderful one😜😜
@saurabhvaishya38963 жыл бұрын
I AM ON JUST 3RD MIN OF THE VIDEO BUT STILL, IT FEELS LIKE BEST OF ALL
@rajwalavalkar72083 жыл бұрын
couta>>b>>c; sir, what is equivalent python code for this c++ code? plz reply!
@laoying203 жыл бұрын
Thanks it was very good.
@derikaem80213 жыл бұрын
great explanation! is there a way to have several init functions, so that you can construct an object with a variable number of attributes?
@adireddy47102 жыл бұрын
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
@riyashrestha34834 жыл бұрын
It is here!!!
@vikramd94143 жыл бұрын
Very useful & excellent teaching👑
@pauloaalcantra11873 жыл бұрын
#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