{"id":24232,"date":"2021-10-14T09:18:53","date_gmt":"2021-10-14T03:48:53","guid":{"rendered":"https:\/\/python-programs.com\/?p=24232"},"modified":"2021-11-05T20:56:35","modified_gmt":"2021-11-05T15:26:35","slug":"python-program-for-exp-function","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-for-exp-function\/","title":{"rendered":"Python Program for exp() Function"},"content":{"rendered":"

In the previous article, we have discussed Python Program for modf() Function<\/a>
\nexp() Function in Python:<\/strong><\/p>\n

The method math.exp() returns E raised to the power of x (Ex<\/sup>).<\/p>\n

‘E’ is the natural logarithmic system’s base (approximately 2.718282), and x is the number passed to it.<\/p>\n

Syntax:<\/strong><\/p>\n

math.exp(x)<\/pre>\n

Parameters:<\/strong><\/p>\n

x:<\/strong> This is required. The exponent is specified by this.<\/p>\n

Return Value:<\/strong><\/p>\n

A float value representing ‘E’ raised to the power of x is returned as the return value.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 5<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying exp() function on above given number 5  =  148.4131591025766<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 7.5<\/pre>\n

Output:<\/strong><\/p>\n

The result after applying exp() function on above given number 7.5  =  1808.0424144560632<\/pre>\n

Program for exp() Function in Python<\/h2>\n