title
Python Class | Python Classes | Python Programming | Python Tutorial | Edureka
description
( Python Training : https://www.edureka.co/data-science-python-certification-course )
This Edureka Python Class tutorial (Python Tutorial Blog: https://goo.gl/wd28Zr) will help you understand Python Classes and Objects with examples. It will also explain the concept of Abstract Classes and Inheritance in python.
Check out our Python Training Playlist: https://goo.gl/Na1p9G
This Python Programming tutorial video helps you to learn following topics:
1. Python Classes and Objects
2. Inheritance
3. Abstract Classes
Subscribe to our channel to get video updates. Hit the subscribe button above.
#Python #Pythontutorial #Pythononlinetraining #Pythonforbeginners #PythonProgramming #PythonClass #PythonObject #PyhonInheritance #PythonAbstraction
How it Works?
1. This is a 5 Week Instructor led Online Course,40 hours of assignment and 20 hours of project work
2. We have a 24x7 One-on-One LIVE Technical Support to help you with any problems you might face or any clarifications you may require during the course.
3. At the end of the training you will be working on a real time project for which we will provide you a Grade and a Verifiable Certificate!
- - - - - - - - - - - - - - - - -
About the Course
Edureka's Python Online Certification Training will make you an expert in Python programming. It will also help you learn Python the Big data way with integration of Machine learning, Pig, Hive and Web Scraping through beautiful soup. During our Python Certification training, our instructors will help you:
1. Master the Basic and Advanced Concepts of Python
2. Understand Python Scripts on UNIX/Windows, Python Editors and IDEs
3. Master the Concepts of Sequences and File operations
4. Learn how to use and create functions, sorting different elements, Lambda function, error handling techniques and Regular expressions ans using modules in Python
5. Gain expertise in machine learning using Python and build a Real Life Machine Learning application
6. Understand the supervised and unsupervised learning and concepts of Scikit-Learn
7. Master the concepts of MapReduce in Hadoop
8. Learn to write Complex MapReduce programs
9. Understand what is PIG and HIVE, Streaming feature in Hadoop, MapReduce job running with Python
10. Implementing a PIG UDF in Python, Writing a HIVE UDF in Python, Pydoop and/Or MRjob Basics
11. Master the concepts of Web scraping in Python
12. Work on a Real Life Project on Big Data Analytics using Python and gain Hands on Project Experience
- - - - - - - - - - - - - - - - - - -
Why learn Python?
Programmers love Python because of how fast and easy it is to use. Python cuts development time in half with its simple to read syntax and easy compilation feature. Debugging your programs is a breeze in Python with its built in debugger. Using Python makes Programmers more productive and their programs ultimately better. Python continues to be a favorite option for data scientists who use it for building and using Machine learning applications and other scientific computations.
Python runs on Windows, Linux/Unix, Mac OS and has been ported to Java and .NET virtual machines. Python is free to use, even for the commercial products, because of its OSI-approved open source license.
Python has evolved as the most preferred Language for Data Analytics and the increasing search trends on python also indicates that Python is the next "Big Thing" and a must for Professionals in the Data Analytics domain.
For more information, Please write back to us at sales@edureka.co or call us at IND: 9606058406 / US: 18338555775 (toll free).
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
detail
{'title': 'Python Class | Python Classes | Python Programming | Python Tutorial | Edureka', 'heatmap': [{'end': 1379.887, 'start': 1322.698, 'weight': 1}, {'end': 1429.686, 'start': 1401.093, 'weight': 0.777}], 'summary': 'This python tutorial covers classes and objects, including inheritance and abstract classes, with students confirming their understanding and expressing no queries. it demonstrates the creation and modification of classes, resulting in a 5% to 10% increase in student marks, and also explains the concept of inheritance and method resolution order.', 'chapters': [{'end': 43.923, 'segs': [{'end': 43.923, 'src': 'embed', 'start': 0.069, 'weight': 0, 'content': [{'end': 2.171, 'text': 'Hello everyone, this is Sourav from Edureka.', 'start': 0.069, 'duration': 2.102}, {'end': 5.733, 'text': "In today's session, we'll be learning about Python classes.", 'start': 2.751, 'duration': 2.982}, {'end': 10.136, 'text': 'So without any further ado, let us move forward and have a look at the agenda for today.', 'start': 6.293, 'duration': 3.843}, {'end': 13.459, 'text': "First we'll see what are classes and objects in general.", 'start': 10.797, 'duration': 2.662}, {'end': 15.94, 'text': "And then we'll see what are classes in Python.", 'start': 13.919, 'duration': 2.021}, {'end': 19.083, 'text': "We'll learn how to create a class, what is its syntax, all those things.", 'start': 16, 'duration': 3.083}, {'end': 21.644, 'text': "Then we'll see what exactly is inheritance.", 'start': 19.743, 'duration': 1.901}, {'end': 25.287, 'text': "And then finally, I'll tell you what are abstract classes.", 'start': 22.185, 'duration': 3.102}, {'end': 32.372, 'text': 'So are we all clear with the agenda? Kindly give me a quick confirmation by writing down in the chat box so that I can proceed.', 'start': 25.907, 'duration': 6.465}, {'end': 34.995, 'text': 'John says, looks fine.', 'start': 33.714, 'duration': 1.281}, {'end': 37.538, 'text': 'Ayushi says, please move on.', 'start': 35.015, 'duration': 2.523}, {'end': 39.419, 'text': 'Ron says, okay.', 'start': 38.298, 'duration': 1.121}, {'end': 41.581, 'text': 'So does Prateek, all right.', 'start': 40.22, 'duration': 1.361}, {'end': 43.923, 'text': "So I've got a confirmation from almost everyone.", 'start': 42.002, 'duration': 1.921}], 'summary': 'Sourav from edureka introduces python classes and covers agenda with confirmation from participants.', 'duration': 43.854, 'max_score': 0.069, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH869.jpg'}], 'start': 0.069, 'title': 'Python classes overview', 'summary': 'Covers python classes, including the definition, syntax, and topics like inheritance and abstract classes, with nearly everyone confirming their understanding of the agenda.', 'chapters': [{'end': 43.923, 'start': 0.069, 'title': 'Python classes overview', 'summary': 'Covers python classes, including the definition, syntax, and topics like inheritance and abstract classes, with nearly everyone confirming their understanding of the agenda.', 'duration': 43.854, 'highlights': ['The session covers Python classes, including the definition, syntax, and topics like inheritance and abstract classes.', 'The instructor confirms the understanding of the agenda with nearly everyone participating in the session.', 'The session begins with an introduction to Python classes and moves on to cover topics like inheritance and abstract classes.']}], 'duration': 43.854, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH869.jpg', 'highlights': ['The session covers Python classes, including the definition, syntax, and topics like inheritance and abstract classes.', 'The session begins with an introduction to Python classes and moves on to cover topics like inheritance and abstract classes.', 'The instructor confirms the understanding of the agenda with nearly everyone participating in the session.']}, {'end': 562.655, 'segs': [{'end': 173.377, 'src': 'embed', 'start': 124.495, 'weight': 0, 'content': [{'end': 133.526, 'text': 'Basically, classes allow us to logically group our data and function in a way that is easy to reuse and a way to build upon if need to be.', 'start': 124.495, 'duration': 9.031}, {'end': 136.202, 'text': 'Let me explain you this with an example.', 'start': 134.161, 'duration': 2.041}, {'end': 143.606, 'text': 'So we have a class here that is employee and it has various attributes such as name age and salary.', 'start': 136.802, 'duration': 6.804}, {'end': 149.91, 'text': 'But what are objects objects and nothing but the instance of this particular class that is employee.', 'start': 144.306, 'duration': 5.604}, {'end': 151.59, 'text': "I'm just giving an example.", 'start': 150.43, 'duration': 1.16}, {'end': 157.712, 'text': 'So What are objects? Objects are the instance of a class and in our example, the class is employee.', 'start': 152.111, 'duration': 5.601}, {'end': 160.673, 'text': 'So the objects will be instance of the employee class.', 'start': 158.153, 'duration': 2.52}, {'end': 169.016, 'text': 'For example, this is the first object that contains variables such as Sara, the name, 37 is her age and this is her salary.', 'start': 160.973, 'duration': 8.043}, {'end': 173.377, 'text': 'Similarly, we have the second object or the second instance where the name is Neil.', 'start': 169.476, 'duration': 3.901}], 'summary': 'Classes group data & functions for reuse; objects are instances of classes.', 'duration': 48.882, 'max_score': 124.495, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8124495.jpg'}, {'end': 278.283, 'src': 'embed', 'start': 248.012, 'weight': 1, 'content': [{'end': 250.978, 'text': 'So this slide actually tells you how to create class in Python.', 'start': 248.012, 'duration': 2.966}, {'end': 255.246, 'text': "So I've given a syntax over here in which you have to first write class,", 'start': 251.499, 'duration': 3.747}, {'end': 260.295, 'text': 'then give a name and then various variables and functions that you are going to define in your class.', 'start': 255.246, 'duration': 5.049}, {'end': 264.28, 'text': 'Now class in Python actually consists of three key components.', 'start': 260.939, 'duration': 3.341}, {'end': 271.702, 'text': "There's a class variable and this class variable is actually shared by all the instances or the objects of the class.", 'start': 264.86, 'duration': 6.842}, {'end': 278.283, 'text': 'Now when we talk about instance variables, these variables are unique to each and every object or class.', 'start': 272.342, 'duration': 5.941}], 'summary': 'Creating a class in python involves class and instance variables shared by all instances and unique to each object.', 'duration': 30.271, 'max_score': 248.012, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8248012.jpg'}], 'start': 44.504, 'title': 'Python classes and objects', 'summary': 'Covers the concept of classes, objects, and instances in python, emphasizing logical grouping and reusability, also demonstrating the creation and use of classes, including variables, methods, and object instantiation.', 'chapters': [{'end': 221.459, 'start': 44.504, 'title': 'Classes, objects, and instances in python', 'summary': 'Explains the difference between procedural and object-oriented languages, the concept of classes and objects, and the relationship between objects and instances in python, emphasizing the importance of logical grouping and reusability.', 'duration': 176.955, 'highlights': ['Object-oriented languages split the program into self-contained objects, each representing a different part of the application, with their own data and logic. In object-oriented languages, the program is split apart into self-contained objects, each representing a different part of the application. Each object has its own data and logic, allowing for better manageability and reusability.', 'Classes in Python allow for logical grouping of data and functions, promoting reusability and extensibility. Classes in Python enable the logical grouping of data and functions, making it easy to reuse and build upon them as needed.', "Objects are instances of classes, representing real-world entities with their own set of attributes and values. Objects are instances of classes, representing real-world entities with their own set of attributes and values. For example, in the provided instance, the class 'employee' has instances like Sara, Neil, and Jessica, each with their own set of attributes."]}, {'end': 562.655, 'start': 223.059, 'title': 'Creating class in python', 'summary': 'Demonstrates how to create and use classes in python, including defining class variables, instance variables, and methods, and creating objects with instance variables and printing their email addresses.', 'duration': 339.596, 'highlights': ['The chapter explains the syntax for creating a class in Python, including the use of class variables, instance variables, and methods. It provides a clear understanding of the syntax and components of a class in Python.', 'It demonstrates the practical creation of a class in Python using PyCharm, including the definition of attributes and methods and the creation of objects with instance variables. It offers a practical demonstration of creating a class in Python using PyCharm and defining attributes and methods.', "It exemplifies the creation of instance variables for objects of the 'student' class, including defining first name, last name, email, and marks for each student. It illustrates the process of defining and assigning instance variables for objects of the 'student' class, showcasing the creation of multiple instance variables.", "The chapter demonstrates how to print the email addresses of the created student instances using the 'print' function. It showcases the process of using the 'print' function to display specific instance variables, such as email addresses, for the created student instances."]}], 'duration': 518.151, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH844504.jpg', 'highlights': ['Classes in Python enable the logical grouping of data and functions, making it easy to reuse and build upon them as needed.', 'The chapter explains the syntax for creating a class in Python, including the use of class variables, instance variables, and methods.', 'It provides a clear understanding of the syntax and components of a class in Python.', 'Objects are instances of classes, representing real-world entities with their own set of attributes and values.']}, {'end': 1030.567, 'segs': [{'end': 587.818, 'src': 'embed', 'start': 564.396, 'weight': 1, 'content': [{'end': 571.337, 'text': "Now what if I don't want to manually set these variables? You can see that it is a lot of code and also it is prone to error.", 'start': 564.396, 'duration': 6.941}, {'end': 575.959, 'text': "Now to make it automatic, what I'll use, I'll use the init method.", 'start': 572.058, 'duration': 3.901}, {'end': 580.14, 'text': "Or you can say the init function, I'm going to define it inside my class.", 'start': 576.379, 'duration': 3.761}, {'end': 587.818, 'text': "So you can think of initialize method or you can consider this as constructors if you're coming from another programming language background,", 'start': 580.916, 'duration': 6.902}], 'summary': 'Automate variable setting using the init method to reduce code and errors.', 'duration': 23.422, 'max_score': 564.396, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8564396.jpg'}, {'end': 813.719, 'src': 'embed', 'start': 783.425, 'weight': 2, 'content': [{'end': 788.066, 'text': 'But when we have created the student down here this instances are passed automatically.', 'start': 783.425, 'duration': 4.641}, {'end': 793.588, 'text': 'So we can leave off self and we only need to provide the first name last name and marks.', 'start': 788.666, 'duration': 4.922}, {'end': 799.031, 'text': 'So with this self, what actually happens, the init method will run automatically.', 'start': 794.468, 'duration': 4.563}, {'end': 807.775, 'text': 'So std underscore one will be passed as self, and then it will set all these attributes that are first name, last name, et cetera.', 'start': 799.711, 'duration': 8.064}, {'end': 813.719, 'text': 'It will set self.first equals to first, which we have passed as Hemant or Neil.', 'start': 808.396, 'duration': 5.323}], 'summary': 'Automatic instance creation with attributes: first name, last name, marks.', 'duration': 30.294, 'max_score': 783.425, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8783425.jpg'}, {'end': 870.889, 'src': 'embed', 'start': 836.875, 'weight': 0, 'content': [{'end': 839.696, 'text': "So to do that, I'll add some methods to this class.", 'start': 836.875, 'duration': 2.821}, {'end': 843.478, 'text': 'Suppose I want the ability to display the full name of the student.', 'start': 839.796, 'duration': 3.682}, {'end': 853.303, 'text': 'So one way of doing that is what I can do, over here I can print one more line and put in two curly braces.', 'start': 844.399, 'duration': 8.904}, {'end': 856.44, 'text': 'That is the two placeholders I should say.', 'start': 854.639, 'duration': 1.801}, {'end': 859.622, 'text': 'Give a space between both of them.', 'start': 858.101, 'duration': 1.521}, {'end': 870.889, 'text': 'format and the first instance that is std underscore one .', 'start': 861.443, 'duration': 9.446}], 'summary': "Adding methods to class to display student's full name using placeholders.", 'duration': 34.014, 'max_score': 836.875, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8836875.jpg'}, {'end': 942.599, 'src': 'embed', 'start': 918.065, 'weight': 4, 'content': [{'end': 925.189, 'text': "Now as I've told you earlier as well, each method inside a class automatically take the instance as the first argument.", 'start': 918.065, 'duration': 7.124}, {'end': 929.291, 'text': 'For example, std underscore one is an instance, std underscore two is an instance.', 'start': 925.309, 'duration': 3.982}, {'end': 932.893, 'text': 'And we are going to always call that self.', 'start': 930.212, 'duration': 2.681}, {'end': 938.497, 'text': 'And instance is the only argument that we need for full name, right? We have first name, we have last name.', 'start': 933.854, 'duration': 4.643}, {'end': 939.737, 'text': 'So we need just the instance.', 'start': 938.517, 'duration': 1.22}, {'end': 942.599, 'text': 'Self, all right, give a colon.', 'start': 940.418, 'duration': 2.181}], 'summary': 'Class methods take instance as first argument, for example, std_one and std_two are instances.', 'duration': 24.534, 'max_score': 918.065, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8918065.jpg'}], 'start': 564.396, 'title': 'Python class and object basics', 'summary': 'Covers creating instances of a student class, passing values to init method, defining methods within a class, and using placeholders and format method for string concatenation, reducing manual effort and potential for error.', 'chapters': [{'end': 757.838, 'start': 564.396, 'title': 'Automatic initialization in python classes', 'summary': 'Discusses using the init method to automatically initialize instance variables in a python class, allowing for the automatic setting of attributes such as first name, last name, marks, and email address, resulting in reduced manual effort and potential for error.', 'duration': 193.442, 'highlights': ['The chapter explains the use of the init method to automatically initialize instance variables in a Python class, reducing manual effort and potential for error.', 'It demonstrates the automatic setting of attributes such as first name, last name, marks, and email address for students using the init method.', 'The chapter also showcases the use of constructors in Python classes for automatic initialization, akin to other programming languages like C++ or Java.']}, {'end': 1030.567, 'start': 758.479, 'title': 'Python class and object basics', 'summary': 'Covers creating instances of a student class, passing values to init method, defining methods within a class, and using placeholders and format method for string concatenation, demonstrating the ability to perform actions and functionality in one place.', 'duration': 272.088, 'highlights': ['The chapter covers creating instances of a student class, passing values to init method, defining methods within a class, and using placeholders and format method for string concatenation, demonstrating the ability to perform actions and functionality in one place.', 'The init method takes the instance (self) and the first name, last name, and marks as arguments when creating instances of the student class.', 'Demonstrated the use of placeholders and the format method to concatenate strings, providing an example of displaying the full name of a student and the ability to perform actions in one place.', "Defined a method inside a class to allow putting functionality in one place for all instances, demonstrating the use of 'self' as the instance and returning the full name for all instances.", 'Discussed the importance of creating a method inside a class to centralize functionality and demonstrated its use for returning the full name for all instances.']}], 'duration': 466.171, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH8564396.jpg', 'highlights': ['The chapter covers creating instances of a student class, passing values to init method, defining methods within a class, and using placeholders and format method for string concatenation, demonstrating the ability to perform actions and functionality in one place.', 'The chapter explains the use of the init method to automatically initialize instance variables in a Python class, reducing manual effort and potential for error.', 'It demonstrates the automatic setting of attributes such as first name, last name, marks, and email address for students using the init method.', 'The init method takes the instance (self) and the first name, last name, and marks as arguments when creating instances of the student class.', "Defined a method inside a class to allow putting functionality in one place for all instances, demonstrating the use of 'self' as the instance and returning the full name for all instances."]}, {'end': 1420.604, 'segs': [{'end': 1063.936, 'src': 'embed', 'start': 1032.548, 'weight': 3, 'content': [{'end': 1034.588, 'text': 'Now let us talk about class variables.', 'start': 1032.548, 'duration': 2.04}, {'end': 1039.75, 'text': 'As we have discussed in the slides as well, we have seen what are instance variables, we have seen methods.', 'start': 1035.049, 'duration': 4.701}, {'end': 1042.252, 'text': 'Now the thing that is left is class variables.', 'start': 1040.191, 'duration': 2.061}, {'end': 1046.633, 'text': 'Now class variables are variables that are shared among all instances of a class.', 'start': 1042.811, 'duration': 3.822}, {'end': 1055.297, 'text': 'Our instance variables can be unique for each instance, like names, marks, email ID, et cetera, but class variables should be same for each instance.', 'start': 1047.314, 'duration': 7.983}, {'end': 1060.392, 'text': 'So, in this example, what kind of data that we want to share between our objects?', 'start': 1056.107, 'duration': 4.285}, {'end': 1063.936, 'text': 'Any idea, guys, in this example that will suit?', 'start': 1061.833, 'duration': 2.103}], 'summary': 'Class variables are shared among all instances of a class, unlike instance variables which are unique for each instance. they hold common data such as names, marks, and email ids.', 'duration': 31.388, 'max_score': 1032.548, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81032548.jpg'}, {'end': 1151.941, 'src': 'embed', 'start': 1123.956, 'weight': 0, 'content': [{'end': 1131.997, 'text': "All right so what I've done here is I have defined a class variable that is percentage rise and that is equals to 5%.", 'start': 1123.956, 'duration': 8.041}, {'end': 1137.138, 'text': 'So basically every student is getting a 5% rise in his or her marks every year.', 'start': 1131.997, 'duration': 5.141}, {'end': 1140.179, 'text': 'So I need to write a method for that.', 'start': 1138.018, 'duration': 2.161}, {'end': 1151.941, 'text': "So what I'm going to do is I am going to define one more method and I'm going to name it as apply underscore raise.", 'start': 1140.699, 'duration': 11.242}], 'summary': "Class variable 'percentage rise' set to 5%. a method 'apply_raise' needs to be written for 5% annual rise in student marks.", 'duration': 27.985, 'max_score': 1123.956, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81123956.jpg'}, {'end': 1247.179, 'src': 'embed', 'start': 1218.977, 'weight': 1, 'content': [{'end': 1223.4, 'text': 'So now we have printed out marks first and then apply the 4% increase.', 'start': 1218.977, 'duration': 4.423}, {'end': 1227.202, 'text': 'So in order to apply that 4% in order to apply repeat.', 'start': 1223.42, 'duration': 3.782}, {'end': 1229.784, 'text': 'So this will print the marks of the student one.', 'start': 1227.622, 'duration': 2.162}, {'end': 1234.066, 'text': 'So now I want to apply that 5% increase in his marks.', 'start': 1230.244, 'duration': 3.822}, {'end': 1247.179, 'text': 'So for that what I need is I need to write in student, for that what I need is, now we have printed the marks of the first student.', 'start': 1234.086, 'duration': 13.093}], 'summary': 'Marks are printed, then increased by 4% and 5% for the first student.', 'duration': 28.202, 'max_score': 1218.977, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81218977.jpg'}, {'end': 1379.887, 'src': 'heatmap', 'start': 1322.698, 'weight': 1, 'content': [{'end': 1324.658, 'text': 'So yeah keep up the good work Hemanth.', 'start': 1322.698, 'duration': 1.96}, {'end': 1329.52, 'text': "Now I'm going to show you the dictionary of the second student that is std underscore two.", 'start': 1325.579, 'duration': 3.941}, {'end': 1336.703, 'text': 'So for that, what I need to do is I need to just write in print the name std, underscore two dot.', 'start': 1329.54, 'duration': 7.163}, {'end': 1343.098, 'text': 'All right, so let us go ahead and execute this and see what happens.', 'start': 1339.294, 'duration': 3.804}, {'end': 1347.183, 'text': "So this will give me all the key value pairs that I'm talking about.", 'start': 1344.24, 'duration': 2.943}, {'end': 1350.647, 'text': 'So first name, this is the key, this is the value for that.', 'start': 1347.203, 'duration': 3.444}, {'end': 1354.391, 'text': 'Similarly last, and this is the value for that last key.', 'start': 1350.727, 'duration': 3.664}, {'end': 1357.335, 'text': 'This is the key again, and this is the value.', 'start': 1354.752, 'duration': 2.583}, {'end': 1359.397, 'text': 'Similarly, when we talk about email address.', 'start': 1357.435, 'duration': 1.962}, {'end': 1367.763, 'text': 'One thing to notice here guys is that nowhere it is written the purse underscore rise is equals to 1.05 that is nothing to the class variable.', 'start': 1360.461, 'duration': 7.302}, {'end': 1372.845, 'text': 'You cannot see it in the whole dictionary of that particular object.', 'start': 1368.263, 'duration': 4.582}, {'end': 1379.887, 'text': "So basically when we access that purse underscore rise from our instances they don't actually have that attribute.", 'start': 1373.865, 'duration': 6.022}], 'summary': 'Demonstrating dictionary of the second student, highlighting absence of class variable purse_rise', 'duration': 57.189, 'max_score': 1322.698, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81322698.jpg'}], 'start': 1032.548, 'title': 'Class variables and python class attributes', 'summary': "Covers the purpose and implementation of class variables, such as applying a 5% annual rise in students' marks and accessing class variables from instances, resulting in a 63% and 94% increase for two students.", 'chapters': [{'end': 1151.941, 'start': 1032.548, 'title': 'Understanding class variables', 'summary': "Discusses class variables, their purpose as shared variables among instances of a class, and the example of implementing an annual 5% rise in students' marks using a class variable and a method.", 'duration': 119.393, 'highlights': ['Class variables are shared among all instances of a class. Class variables are explained to be shared among all instances of a class, in contrast to instance variables which can be unique for each instance.', "Example of implementing a 5% annual rise in students' marks using a class variable and a method. An example is provided where a class variable named 'percentage rise' is used to implement a 5% annual rise in students' marks, demonstrating the practical application of class variables.", "Explanation of declaring and using a class variable in the context of student marks. The process of declaring and using a class variable 'percentage rise' to facilitate a 5% annual rise in students' marks is explained, providing clarity on the practical implementation of class variables."]}, {'end': 1420.604, 'start': 1153.024, 'title': 'Python class attribute example', 'summary': 'Explains the logic of applying a 5% increase to the marks of two students, resulting in a 63% increase for the first student and 94% for the second student, and demonstrates how class variables are accessed from instances.', 'duration': 267.58, 'highlights': ['The 5% increase in marks resulted in a 63% final mark for the first student.', 'Applying a 5% increase in marks led to a 94% final mark for the second student.', "The instances access the class variable 'purse_rise' to apply the 5% increase in marks."]}], 'duration': 388.056, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81032548.jpg', 'highlights': ["Example of implementing a 5% annual rise in students' marks using a class variable and a method.", 'Applying a 5% increase in marks led to a 94% final mark for the second student.', 'The 5% increase in marks resulted in a 63% final mark for the first student.', 'Class variables are shared among all instances of a class.']}, {'end': 1788.972, 'segs': [{'end': 1464.114, 'src': 'embed', 'start': 1421.964, 'weight': 1, 'content': [{'end': 1429.686, 'text': 'So I hope you have understood what a class is and how to create an object for a class and we have actually seen how to define method inside the class.', 'start': 1421.964, 'duration': 7.722}, {'end': 1432.747, 'text': 'We have seen what exactly are class variables.', 'start': 1430.106, 'duration': 2.641}, {'end': 1435.748, 'text': 'So all those concepts I hope you all are clear with.', 'start': 1433.207, 'duration': 2.541}, {'end': 1440.369, 'text': "If you have any doubt, any queries, please write it down in your chat box and I'll be happy to help you.", 'start': 1435.848, 'duration': 4.521}, {'end': 1450.044, 'text': "Okay, so Theon says crystal clear, Jason says it's clear, Ron says no question, so does Prateek, same goes for Ayushi and John.", 'start': 1442.119, 'duration': 7.925}, {'end': 1452.906, 'text': "All right, so I've got a confirmation from almost everyone.", 'start': 1450.585, 'duration': 2.321}, {'end': 1455.628, 'text': "So I'll move forward and explain to you what is inheritance.", 'start': 1453.387, 'duration': 2.241}, {'end': 1464.114, 'text': 'So what is inheritance? Just like it sounds, inheritance allows us to inherit attributes and methods from the base class.', 'start': 1456.429, 'duration': 7.685}], 'summary': 'Introduction to class, objects, methods, and class variables. confirmation from participants. next topic: inheritance.', 'duration': 42.15, 'max_score': 1421.964, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81421964.jpg'}, {'end': 1779.483, 'src': 'embed', 'start': 1750.275, 'weight': 0, 'content': [{'end': 1753.117, 'text': 'that is here in the method resolution order at the top.', 'start': 1750.275, 'duration': 2.842}, {'end': 1757.08, 'text': 'After that it look at the base class of this dump class that is student.', 'start': 1753.797, 'duration': 3.283}, {'end': 1762.004, 'text': "Even if it doesn't find over there then it'll actually look in this object class.", 'start': 1757.761, 'duration': 4.243}, {'end': 1765.947, 'text': 'So every class in Python inherits from this object class.', 'start': 1762.684, 'duration': 3.263}, {'end': 1769.973, 'text': 'So I hope method resolution order is clear to you.', 'start': 1767.711, 'duration': 2.262}, {'end': 1771.555, 'text': 'Let me just repeat it once more.', 'start': 1770.294, 'duration': 1.261}, {'end': 1779.483, 'text': "So what happens when I actually instantiate the dumb students it will first look at the dumb class for the INET method but it won't find it there.", 'start': 1771.975, 'duration': 7.508}], 'summary': 'Python classes inherit from object class; method resolution order explained.', 'duration': 29.208, 'max_score': 1750.275, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81750275.jpg'}], 'start': 1421.964, 'title': 'Understanding classes, objects, and inheritance', 'summary': 'Covers concepts of classes, object creation, method definition, and class variables, and discusses inheritance, with students expressing understanding and no queries. it also explains the concept of inheritance in python, demonstrating the creation of subclasses with shared functionalities and method resolution order, including an example with vehicle classes and student subclasses.', 'chapters': [{'end': 1464.114, 'start': 1421.964, 'title': 'Understanding classes, objects, and inheritance', 'summary': 'Covers the concepts of classes, object creation, method definition, and class variables. the instructor also discusses inheritance, where attributes and methods can be inherited from a base class. the students express understanding and no queries regarding the topics discussed.', 'duration': 42.15, 'highlights': ['The instructor covers the concepts of classes, object creation, method definition, and class variables, ensuring clarity for the students.', 'The students express their understanding and lack of queries regarding the covered topics, with confirmations from Theon, Jason, Ron, Prateek, Ayushi, and John.']}, {'end': 1788.972, 'start': 1465.063, 'title': 'Python inheritance concept', 'summary': 'Explains the concept of inheritance in python, demonstrating the creation of subclasses with shared functionalities and the method resolution order, including an example with vehicle classes and student subclasses, showcasing the reuse of code and method inheritance.', 'duration': 323.909, 'highlights': ['The concept of inheritance in Python is explained, demonstrating the creation of subclasses with shared functionalities and the method resolution order. The chapter explains how subclasses can inherit functionality from the superclass, enabling the reuse of code and method inheritance, showcasing the concept with vehicle classes and student subclasses.', 'Example of creating subclasses such as studious and dumb students to showcase the reuse of code by inheriting from the student class. The example demonstrates the creation of subclasses like studious and dumb students, showcasing the reuse of code by inheriting from the student class, and the availability of inherited details in the subclasses.', 'Demonstration of the method resolution order (MRO) in Python, clarifying how classes search for methods in a specific order, including the object class as the final fallback. The chapter elucidates the method resolution order in Python, explaining how classes search for methods in a specific order, including the object class as the final fallback when a method is not found in the subclasses or base class.']}], 'duration': 367.008, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81421964.jpg', 'highlights': ['The concept of inheritance in Python is explained, demonstrating the creation of subclasses with shared functionalities and the method resolution order.', 'The instructor covers the concepts of classes, object creation, method definition, and class variables, ensuring clarity for the students.', 'The students express their understanding and lack of queries regarding the covered topics, with confirmations from Theon, Jason, Ron, Prateek, Ayushi, and John.', 'Demonstration of the method resolution order (MRO) in Python, clarifying how classes search for methods in a specific order, including the object class as the final fallback.']}, {'end': 2586.194, 'segs': [{'end': 1816.415, 'src': 'embed', 'start': 1789.861, 'weight': 0, 'content': [{'end': 1796.244, 'text': "Now what if I want to change the purse underscore rise for the dumb student to 10%? He's working hard.", 'start': 1789.861, 'duration': 6.383}, {'end': 1800.427, 'text': "Say suppose Neil has started working hard and he's getting good marks.", 'start': 1796.264, 'duration': 4.163}, {'end': 1805.069, 'text': 'So basically his marks are increasing at 10%, say at the rate of 10%.', 'start': 1800.987, 'duration': 4.082}, {'end': 1807.591, 'text': 'So let me show you how you can do that.', 'start': 1805.069, 'duration': 2.522}, {'end': 1816.415, 'text': 'Now what you need to do is in the class that we have defined as dumb, just write the purse underscore rise equal to 10%.', 'start': 1808.291, 'duration': 8.124}], 'summary': 'Increase the purse rise for the diligent student to 10%.', 'duration': 26.554, 'max_score': 1789.861, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81789861.jpg'}, {'end': 1921.366, 'src': 'embed', 'start': 1889.693, 'weight': 1, 'content': [{'end': 1890.814, 'text': 'So now, what does this prove?', 'start': 1889.693, 'duration': 1.121}, {'end': 1898.338, 'text': 'This proves that whatever changes that we have made in the dumb class does not actually affect the class variables that was present in the base class that was student.', 'start': 1890.834, 'duration': 7.504}, {'end': 1905.663, 'text': 'Now if I want to add one more attribute say a programming language in which the student is master.', 'start': 1899.379, 'duration': 6.284}, {'end': 1912.064, 'text': "I'm going to do that with the help of init method but it doesn't exist in our parent class.", 'start': 1906.542, 'duration': 5.522}, {'end': 1921.366, 'text': 'So how will I do that? I can copy the entire student logic and do that but it will increase the code size and we want it to be more manageable.', 'start': 1912.624, 'duration': 8.742}], 'summary': "Changes in subclass don't affect base class variables. need for manageable code.", 'duration': 31.673, 'max_score': 1889.693, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81889693.jpg'}, {'end': 2095.215, 'src': 'embed', 'start': 2070.475, 'weight': 3, 'content': [{'end': 2076.06, 'text': 'So what I mean by abstract class is that these classes cannot be instantiated,', 'start': 2070.475, 'duration': 5.585}, {'end': 2085.047, 'text': 'or you can say that you cannot create the objects or instance for these classes, but it can only be used for inheriting certain functionalities,', 'start': 2076.06, 'duration': 8.987}, {'end': 2086.889, 'text': 'and you can call it as a base class.', 'start': 2085.047, 'duration': 1.842}, {'end': 2088.77, 'text': 'So you can call it as base class.', 'start': 2087.509, 'duration': 1.261}, {'end': 2095.215, 'text': 'you can inherit certain functionalities but at the same time you cannot create the instances or the objects of this particular class, that is,', 'start': 2088.77, 'duration': 6.445}], 'summary': 'Abstract classes cannot be instantiated, only used for inheritance and as base classes.', 'duration': 24.74, 'max_score': 2070.475, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH82070475.jpg'}, {'end': 2156.422, 'src': 'embed', 'start': 2128.369, 'weight': 4, 'content': [{'end': 2131.632, 'text': 'All right, so let us go ahead and see one example for abstract class.', 'start': 2128.369, 'duration': 3.263}, {'end': 2135.569, 'text': 'Now, in order to show you an example for this abstract class.', 'start': 2133.228, 'duration': 2.341}, {'end': 2139.612, 'text': "what I'm going to do is I'm going to first remove all this code that we have written till now.", 'start': 2135.569, 'duration': 4.043}, {'end': 2146.916, 'text': "Now I need to import certain methods for that I'll type import ABC that is abstract base class.", 'start': 2140.332, 'duration': 6.584}, {'end': 2155.241, 'text': 'Import ABC comma abstract method.', 'start': 2148.137, 'duration': 7.104}, {'end': 2156.422, 'text': 'All right.', 'start': 2156.082, 'duration': 0.34}], 'summary': 'Example of abstract class demonstrated with code removal and method import.', 'duration': 28.053, 'max_score': 2128.369, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH82128369.jpg'}, {'end': 2443.124, 'src': 'embed', 'start': 2411.347, 'weight': 5, 'content': [{'end': 2417.135, 'text': "So what I'm saying is you need to use that particular method which has been defined in the abstract class at least once.", 'start': 2411.347, 'duration': 5.788}, {'end': 2425.056, 'text': 'So now you can actually write whatever methods you want to do, but first you need to make sure that you have actually used that method.', 'start': 2418.973, 'duration': 6.083}, {'end': 2429.698, 'text': 'or you have defined that method in your base class, or you can say the child class.', 'start': 2425.056, 'duration': 4.642}, {'end': 2431.639, 'text': 'I can give you an example as well.', 'start': 2430.378, 'duration': 1.261}, {'end': 2443.124, 'text': "Now what if I define one more method and I'm going to name it as position underscore one and give an attribute to it as position.", 'start': 2431.699, 'duration': 11.425}], 'summary': 'Use the defined method in the abstract class at least once.', 'duration': 31.777, 'max_score': 2411.347, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH82411347.jpg'}], 'start': 1789.861, 'title': 'Class modification and abstract classes in python', 'summary': 'Covers modifying class attributes, inheritance, and adding new attributes in python, resulting in a 5% to 10% increase in student marks. it also explains abstract classes, their limitations, and demonstrates the process of inheriting and using methods from the abstract base class.', 'chapters': [{'end': 2049.636, 'start': 1789.861, 'title': 'Inheritance and class modification', 'summary': "Discusses modifying class attributes, inheritance, and adding new attributes using python, showcasing an increase in student marks from 5% to 10% and inheritance of the base class's functionalities to the derived class.", 'duration': 259.775, 'highlights': ["The student's marks are increased at a rate of 10% by modifying the class attribute. The student's marks are increased at a rate of 10%, showcasing the modification of the class attribute to reflect the improvement in marks.", "Demonstrating the lack of impact on the base class when changes are made to the derived class. The derived class's modifications do not affect the base class, as evidenced by the unchanged class variable of the base class despite changes made to the derived class.", "Illustrating the inheritance of base class functionalities to the derived class, showcasing the addition of a new attribute through inheritance. The demonstration of inheriting the base class's functionalities to the derived class and adding a new attribute, 'programming language,' through inheritance while minimizing code size and maintaining manageability."]}, {'end': 2586.194, 'start': 2050.576, 'title': 'Understanding abstract classes in python', 'summary': 'Explains abstract classes in python, highlighting that abstract classes cannot be instantiated, can only be used for inheriting certain functionalities, and the importance of using the inherited methods. it also provides an example of implementing an abstract class and demonstrates the process of inheriting and using methods from the abstract base class.', 'duration': 535.618, 'highlights': ['Abstract classes cannot be instantiated and are used for inheriting certain functionalities to a base or child class. The chapter defines abstract classes as classes that cannot be instantiated and can only be used for inheriting certain functionalities to a base or child class.', 'Importing abstract base class and abstract method to demonstrate the implementation of abstract classes in Python. The speaker demonstrates the process of importing the abstract base class and abstract method to implement abstract classes in Python.', 'Providing an example of implementing an abstract class with methods and demonstrating the process of inheriting and using methods from the abstract base class. The chapter provides an example of implementing an abstract class with methods and demonstrates the process of inheriting and using methods from the abstract base class.', 'Emphasizing the importance of using the inherited methods from the abstract base class in the child class. The chapter emphasizes the importance of using the inherited methods from the abstract base class in the child class before defining new methods.']}], 'duration': 796.333, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/98YeQpmQeH8/pics/98YeQpmQeH81789861.jpg', 'highlights': ['Modifying class attributes results in a 10% increase in student marks.', 'Demonstrating lack of impact on base class when changes are made to derived class.', 'Illustrating inheritance of base class functionalities to derived class, showcasing addition of new attribute through inheritance.', 'Abstract classes cannot be instantiated and are used for inheriting certain functionalities to a base or child class.', 'Importing abstract base class and abstract method to demonstrate implementation of abstract classes in Python.', 'Providing an example of implementing an abstract class with methods and demonstrating the process of inheriting and using methods from the abstract base class.', 'Emphasizing the importance of using the inherited methods from the abstract base class in the child class.']}], 'highlights': ['Modifying class attributes results in a 10% increase in student marks.', 'The session covers Python classes, including the definition, syntax, and topics like inheritance and abstract classes.', 'The session begins with an introduction to Python classes and moves on to cover topics like inheritance and abstract classes.', 'The instructor covers the concepts of classes, object creation, method definition, and class variables, ensuring clarity for the students.', 'Demonstration of the method resolution order (MRO) in Python, clarifying how classes search for methods in a specific order, including the object class as the final fallback.', 'The chapter covers creating instances of a student class, passing values to init method, defining methods within a class, and using placeholders and format method for string concatenation, demonstrating the ability to perform actions and functionality in one place.', 'The chapter explains the use of the init method to automatically initialize instance variables in a Python class, reducing manual effort and potential for error.', 'It demonstrates the automatic setting of attributes such as first name, last name, marks, and email address for students using the init method.', 'The init method takes the instance (self) and the first name, last name, and marks as arguments when creating instances of the student class.', "Defined a method inside a class to allow putting functionality in one place for all instances, demonstrating the use of 'self' as the instance and returning the full name for all instances.", 'The concept of inheritance in Python is explained, demonstrating the creation of subclasses with shared functionalities and the method resolution order.', 'Abstract classes cannot be instantiated and are used for inheriting certain functionalities to a base or child class.', 'Importing abstract base class and abstract method to demonstrate implementation of abstract classes in Python.', 'Providing an example of implementing an abstract class with methods and demonstrating the process of inheriting and using methods from the abstract base class.', 'Emphasizing the importance of using the inherited methods from the abstract base class in the child class.', "Example of implementing a 5% annual rise in students' marks using a class variable and a method.", 'Applying a 5% increase in marks led to a 94% final mark for the second student.', 'The 5% increase in marks resulted in a 63% final mark for the first student.', 'Class variables are shared among all instances of a class.', 'Objects are instances of classes, representing real-world entities with their own set of attributes and values.', 'Classes in Python enable the logical grouping of data and functions, making it easy to reuse and build upon them as needed.', 'The chapter explains the syntax for creating a class in Python, including the use of class variables, instance variables, and methods.', 'It provides a clear understanding of the syntax and components of a class in Python.', 'Demonstrating lack of impact on base class when changes are made to derived class.', 'Illustrating inheritance of base class functionalities to derived class, showcasing addition of new attribute through inheritance.']}