Skip to content

Tag Archives: Python-Functions

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
Encapsulation is one of the fundamental concepts in object-oriented programming (OOP) in Python. It describes the idea of wrapping data and the methods that work… 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
Decimal#next_plus() : next_plus() is a Decimal class method which returns the smallest representable number larger than the Decimal value. Syntax: Decimal.next_plus() Parameter: Decimal values Return:… Read More
Decimal#number_class() : number_class() is a Decimal class method which returns the indication of the class of Decimal value. Syntax: Decimal.number_class() Parameter: Decimal values Return: indication… Read More
Decimal#quantize() : quantize() is a Decimal class method which returns a value equal to first decimal value (rounded) having the exponent of second decimal value.… Read More

Start Your Coding Journey Now!