Operational

Python has five operational built-in functions for numeric types: abs(), coerce(), divmod(), pow(), and round(). We will take a look at each and present some usage examples.
 
abs() returns the absolute value of the given argument. If the argument is a complex number, then math.sqrt( num. real2 + num. imag2) is returned. Here are some examples of using the abs() built-in function:

Example

>>> abs(-1)
1
>>> abs(10.)
10.0
>>> abs(12.-2.1j)
12.182364302548173
>>> abs(0.23 - 0.78)
0.55