Numeric Functions¶
Let us understand some of the common numeric functions we use with Python as programming language.
We have functions even for standard operators such as
+
,-
,*
,/
under a library called as operator. However, we use operators more often than functions.add
for+
sub
for-
mul
for*
truediv
for/
We can use
pow
for getting power value.We also have
math
library for some advanced mathematical operations.Also, we have functions such as
min
,max
to get minimum and maximum of the numbers passed.
Docstring:
min(iterable, *[, default=obj, key=func]) -> value
min(arg1, arg2, *args, *[, key=func]) -> value
With a single iterable argument, return its smallest item. The
default keyword-only argument specifies an object to return if
the provided iterable is empty.
With two or more arguments, return the smallest argument.
Type: builtin_function_or_method