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

極客小將

您現(xiàn)在的位置是:首頁 » python編程資訊

資訊內(nèi)容

python e怎么表示

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

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

a7H少兒編程網(wǎng)-https://www.pxcodes.com

本教程操作環(huán)境:windows7系統(tǒng)、python3.9版,DELL G3電腦。a7H少兒編程網(wǎng)-https://www.pxcodes.com

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

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

語法a7H少兒編程網(wǎng)-https://www.pxcodes.com

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

import math math.exp( x )

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

參數(shù)a7H少兒編程網(wǎng)-https://www.pxcodes.com

x -- 數(shù)值表達(dá)式。a7H少兒編程網(wǎng)-https://www.pxcodes.com

返回值a7H少兒編程網(wǎng)-https://www.pxcodes.com

返回x的指數(shù),ex。a7H少兒編程網(wǎng)-https://www.pxcodes.com

實(shí)例a7H少兒編程網(wǎng)-https://www.pxcodes.com

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

#!/usr/bin/python import math # 導(dǎo)入 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)

以上實(shí)例運(yùn)行后輸出結(jié)果為:a7H少兒編程網(wǎng)-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

相關(guān)免費(fèi)學(xué)習(xí)推薦:python視頻教程a7H少兒編程網(wǎng)-https://www.pxcodes.com

以上就是python e怎么表示的詳細(xì)內(nèi)容,更多請(qǐng)關(guān)注少兒編程網(wǎng)其它相關(guān)文章!a7H少兒編程網(wǎng)-https://www.pxcodes.com

預(yù)約試聽課

已有385人預(yù)約都是免費(fèi)的,你也試試吧...

主站蜘蛛池模板: 隆回县| 托克逊县| 鄂托克前旗| 新宁县| 忻州市| 宁蒗| 宜丰县| 衡水市| 乃东县| 平乐县| 广昌县| 西华县| 龙海市| 河西区| 炉霍县| 通渭县| 二手房| 常山县| 静安区| 新宁县| 江源县| 集安市| 太原市| 仲巴县| 泾阳县| 平邑县| 徐水县| 德阳市| 凤阳县| 同心县| 常德市| 温宿县| 胶州市| 达日县| 密山市| 霍邱县| 安远县| 龙川县| 焦作市| 太和县| 青铜峡市|