国产日韩欧美一区二区三区综合,日本黄色免费在线,国产精品麻豆欧美日韩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人預約都是免費的,你也試試吧...

主站蜘蛛池模板: 辽阳县| 木兰县| 玉龙| 来安县| 常山县| 民丰县| 甘洛县| 娄底市| 新野县| 峨眉山市| 德州市| 平潭县| 泗洪县| 上虞市| 全州县| 太湖县| 大丰市| 米林县| 万年县| 河北区| 霍林郭勒市| 天柱县| 永新县| 洛扎县| 克山县| 灌南县| 鹰潭市| 崇阳县| 巫山县| 阳春市| 织金县| 兴宁市| 轮台县| 蒲江县| 临澧县| 台前县| 普兰店市| 宕昌县| 江都市| 旬阳县| 保德县|