In object-oriented programming we write classes that represent real-world things and situations, and then create objects based on these classes. Writing a class is nothing but defining the general behavior that a whole category of objects can have.
When objects are created from the class, each...
Wednesday, October 31, 2018
Tuesday, October 30, 2018
Python is an Object oriented language
Like other programming languages, Python language also supports object oriented programming. Object orientation can help to reduce complexity, particularly in long programs. It also encouragesprogrammers to re-use existing, tested code because it is possible to create objects that inherit themajority of their attributes and methods from an existing class, leaving the programmer to add oroverride...
Saturday, October 27, 2018
Modules in Python
While programming you might have come across with a situation where there is a function that you want to use in many programs without copying it into each program. For example the greet_emp() we made in previous post. This can be used by various departments who have newly joined employees. Thus such...