Python‎ > ‎math‎ > ‎

math.exp()

http://www.adilwaseem.com/

Definition
In Python, exponential function is calculated e is exponential functions of x where e is is Euler's number(2.718281828).

Syntax
math.exp(e**x)

Parameters
e=2.718281828
x=number

Examples
The method return with:
 >>> import math
>>> math.exp(22)
3584912846.131592
>>> math.exp(3)
20.085536923187668
>>> math.exp(33)
214643579785916.06
>>>

if statement sum(map(lamda))__lt__(value()
If statement returns that the sum of the x/y is not less than 2.
 import math
x={math.factorial(81),math.sqrt(49),math.pow(4,2),math.e,math.exp(44)}
y={math.floor(3.12),math.fmod(3,2),math.fabs(22), math.ceil(1)}
if sum(map(lambda a,b: a/b, x,y)).__lt__(2):
                                                        print("The sum of x and y is less than 2")
else:
       print("The sum of x and y is greater than 2.")
>>> 
The sum is greater than 2.
>>>

Comments