欢迎您 本站地址:  
返回首页   返回编程教学   聊斋志异  猜谜语  双人五子棋  电影  三国志  活血袪淤茶  学习PHP  正则表达式 

Python math.e 常量

Python math 模块 Python math 模块

Python math.e 常量用于返回欧拉数 (2.7182...)。

语法

math.e 常量语法如下:

math.e

返回值

返回一个浮点数 2.718281828459045,表示数学常数 e

实例

以下实例返回欧拉数 (2.7182...):

实例

# 导入 math 包
import math

# 输出 e 的值
print (math.e)

输出结果:

2.718281828459045

Python math 模块 Python math 模块

小库提示

扫描下方二维码,访问手机版。