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

主站蜘蛛池模板: 庄河市| 太康县| 唐海县| 松潘县| 兴隆县| 芮城县| 商城县| 海伦市| 红安县| 新蔡县| 资阳市| 前郭尔| 惠水县| 长沙县| 津南区| 昌江| 扶沟县| 福贡县| 肇庆市| 西吉县| 深泽县| 临泉县| 永登县| 渭源县| 修文县| 克东县| 友谊县| 舒城县| 广宗县| 宝山区| 红安县| 饶平县| 南昌县| 大洼县| 津南区| 台山市| 墨玉县| 健康| 聂荣县| 绍兴市| 馆陶县|