Python Math.e常量 (Python math.e constant)
math.e constant is a predefined constant, which is defined in math module, it returns the value of mathematical constant "e", the value is 2.718281828459045
math.e常数是在数学模块中定义的预定义常数,它返回数学常数“ e”的值,该值为2.718281828459045
Syntax of math.e constant:
math.e常量的语法:
math.e
Return value: float – that is the value of mathematical constant "e".
返回值: float-这是数学常数“ e”的值。
Example:
例:
Input:
print(math.e)
Output:
2.718281828459045
Python代码演示math.e常量示例 (Python code to demonstrate example of math.e constant)
# python code to demonstrate example of
# math.e constant
# importing math module
import math
# printing value of e
print("value of e = ", math.e)
Output
输出量
value of e = 2.718281828459045
Reference: Python math library
参考: Python数学库
翻译自: https://www.includehelp.com/python/math-e-constant-with-example.aspx