Skip to content

Tag Archives: Python-Functions

A Routine is a named group of instructions performing some tasks. A routine can always be invoked as well as called multiple times as required… Read More
A bound method is the one which is dependent on the instance of the class as the first argument. It passes the instance as the… Read More
Prerequisite: Functions in Python In Python, any written function can be called by another function. Note that this could be the most elegant way of… Read More
A function is a set of statements that take inputs, do some specific computation and produce output. The idea is to put some commonly or… Read More
Python is an Object oriented programming language i.e everything in Python is an object. There are special kind of methods in Python known as magic… Read More
In Python, functions are treated as first class objects. First class objects in a language are handled uniformly throughout. They may be stored in data… Read More
Prerequisites – Python classes and objects Encapsulation Underscore in Python Encapsulation is one of the fundamental concepts in object-oriented programming (OOP). It describes the idea… Read More
A return statement is used to end the execution of the function call and “returns” the result (value of the expression following the return keyword)… Read More
Decimal#normalize() : normalize() is a Decimal class method which returns the simplest form of the Decimal value. Syntax: Decimal.normalize() Parameter: Decimal values Return: the simplest… Read More
Decimal#next_toward() : next_toward() is a Decimal class method which returns the number closest to first decimal value in the direction towards second decimal value. Syntax:… Read More
Decimal#max() : max() is a Decimal class method which compares the two Decimal values and return the max of two. Syntax: Decimal.max() Parameter: Decimal values… Read More
Decimal#min() : min() is a Decimal class method which compares the two Decimal values and return the min of two. Syntax: Decimal.min() Parameter: Decimal values… Read More
Decimal#max_mag() : max_mag() is a Decimal class method which compares the two Decimal values and return the max of two, with their sign ignored. Syntax:… Read More
Decimal#min_mag() : min_mag() is a Decimal class method which compares the two Decimal values and return the minimum of two, with their sign ignored. Syntax:… Read More
Decimal#next_minus() : next_minus() is a Decimal class method which returns the largest representable number smaller than the Decimal value. Syntax: Decimal.next_minus() Parameter: Decimal values Return:… Read More