This tutorial outlines object oriented programming (OOP) in Python with examples. It is a step by step guide which was designed for people who have no programming experience. Object Oriented Programming is popular and available in other programming languages besides Python which are Java, C++, PHP.
(continued...)Table of Contents
What is Object Oriented Programming?In object-oriented programming (OOP), you have the flexibility to represent real-world objects like car, animal, person, ATM etc. in your code. In simple words, an object is something that possess some characteristics and can perform certain functions. For example, car is an object and can perform functions like start, stop, drive and brake. These are the function of a car. And the characteristics are color of car, mileage, maximum speed, model year etc.
In the above example, car is an object
. Functions are called methods
in OOP world. Characteristics are attributes (properties)
. Technically attributes are variables or values related to the state of the object whereas methods
from Planet SciPy
read more
No comments:
Post a Comment