国产日韩欧美一区二区三区综合,日本黄色免费在线,国产精品麻豆欧美日韩ww,色综合狠狠操

極客小將

您現在的位置是:首頁 » python編程資訊

資訊內容

python e怎么表示

極客小將2021-03-03-
簡介pythone的表示方法:使用【exp()】方法,代碼為【importmath;math.exp(x);】,【exp()】是不能直接訪問的,需要導入math模塊,通過靜態對象調用該方法。本教程操作環境:windows7系統、python3.9版,DELLG3電腦。pythone的表示方法:exp()
歡迎訪問少兒編程網(http://www.pxcodes.com)

python e的表示方法:使用【exp()】方法,代碼為【import math;math.exp( x );】,【exp()】是不能直接訪問的,需要導入math模塊,通過靜態對象調用該方法。a7H少兒編程網-https://www.pxcodes.com

a7H少兒編程網-https://www.pxcodes.com

本教程操作環境:windows7系統、python3.9版,DELL G3電腦。a7H少兒編程網-https://www.pxcodes.com

python e的表示方法:a7H少兒編程網-https://www.pxcodes.com

exp()方法返回x的指數,ex。a7H少兒編程網-https://www.pxcodes.com

語法a7H少兒編程網-https://www.pxcodes.com

以下是 exp() 方法的語法:a7H少兒編程網-https://www.pxcodes.com

import math math.exp( x )

注意:exp()是不能直接訪問的,需要導入 math 模塊,通過靜態對象調用該方法。a7H少兒編程網-https://www.pxcodes.com

參數a7H少兒編程網-https://www.pxcodes.com

x -- 數值表達式。a7H少兒編程網-https://www.pxcodes.com

返回值a7H少兒編程網-https://www.pxcodes.com

返回x的指數,ex。a7H少兒編程網-https://www.pxcodes.com

實例a7H少兒編程網-https://www.pxcodes.com

以下展示了使用 exp() 方法的實例:a7H少兒編程網-https://www.pxcodes.com

#!/usr/bin/python import math # 導入 math 模塊 print "math.exp(-45.17) : ", math.exp(-45.17) print "math.exp(100.12) : ", math.exp(100.12) print "math.exp(100.72) : ", math.exp(100.72) print "math.exp(119L) : ", math.exp(119L) print "math.exp(math.pi) : ", math.exp(math.pi)

以上實例運行后輸出結果為:a7H少兒編程網-https://www.pxcodes.com

math.exp(-45.17) : 2.41500621326e-20 math.exp(100.12) : 3.03084361407e+43 math.exp(100.72) : 5.52255713025e+43 math.exp(119L) : 4.7978133273e+51 math.exp(math.pi) : 23.1406926328

相關免費學習推薦:python視頻教程a7H少兒編程網-https://www.pxcodes.com

以上就是python e怎么表示的詳細內容,更多請關注少兒編程網其它相關文章!a7H少兒編程網-https://www.pxcodes.com

預約試聽課

已有385人預約都是免費的,你也試試吧...

主站蜘蛛池模板: 灌南县| 晋江市| 青龙| 望城县| 广水市| 乡宁县| 清远市| 毕节市| 清水河县| 商丘市| 平度市| 安多县| 邵阳市| 邯郸市| 五寨县| 淳安县| 冀州市| 申扎县| 错那县| 灵台县| 南昌县| 都江堰市| 镇安县| 平山县| 安达市| 永靖县| 平遥县| 六盘水市| 寿光市| 基隆市| 平塘县| 三河市| 黎平县| 汉沽区| 丰城市| 襄樊市| 永顺县| 金堂县| 什邡市| 镇康县| 达拉特旗|