Calculator Program in Python

Python programming is a great tool to evaluate and make manipulations. In this article, We will be learning a simple command-line calculator program in Python 3. We’ll be using mathematical operators, Conditional statements, functions and handle user input to make our calculator. Prerequisites The system should have Python 3 installed on the local computer and have a …

Calculator Program in Python Read More »

Object-Oriented Programming in Python

Object-oriented programming (OOP) refers to the software design wherein programmers define the data type of a data structure, and the types of functions that can be applied to the data structure. This paradigm provides functionalities and behavior pattern to the structure of data. This paradigm maps and models real-world things together and describes a relationship …

Object-Oriented Programming in Python Read More »

Python Logical Operators

Python Operators are symbols/words that tell the Python Interpreter to perform or execute certain manipulation tasks. The logical operators are used to combine multiple boolean statements. There are three logical operators in Python. and or not Python Logical Operators Flowchart The below image depicts the flowchart of the logical operators. Logical AND Operator in Python …

Python Logical Operators Read More »

Python Multiple Inheritance

When a class inherits from more than one class, it’s called multiple inheritances. Python supports multiple inheritances whereas Java doesn’t support it. The properties of all the super/base classes are inherited into the derived/subclass. Python Multiple Inheritance Syntax The syntax for Multiple Inheritance is also similar to the single inheritance. By the way, the derived …

Python Multiple Inheritance Read More »

Inheritance in Python

Inheritance at a glance! In the world of Object-Oriented Programming (OOP), Inheritance refers to the mechanism of the capability of a class to derive or extend the properties from another class in the run. This property enables the derived class to acquire the properties or traits of the base class. Inheritance is considered one of …

Inheritance in Python Read More »

Python Static Method

Python static method belongs to the Class. They are used to create utility methods for the class. The static method is called from the Class reference. They can’t change the state of the object since they belong to the class. In fact, a static method doesn’t have access to the class attributes. The static method …

Python Static Method Read More »

Python Classes and Objects

Python is an Object Oriented Programming(OOP) language. Object Oriented Programming is an essential concept in programming, it allows us to break the programs into reusable components, and implement the concepts like Polymorphism, Encapsulation, Inheritance, and Data Abstraction. The classes and objects are the building block of object-oriented programing. It provides a way to concatenate several …

Python Classes and Objects Read More »

Python main function Examples

The idea of Python main function is to execute some code only when the Python script is executed directly. The function should not execute when the same script is imported as a Python module in another program. How to Write a Python main Function? When we run a python program, it executes all the statements …

Python main function Examples Read More »