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

主站蜘蛛池模板: 雷山县| 福清市| 进贤县| 南通市| 兰坪| 津南区| 万荣县| 彭州市| 罗源县| 江源县| 正蓝旗| 年辖:市辖区| 彭水| 衢州市| 仁寿县| 彭泽县| 伊川县| 新巴尔虎左旗| 敦煌市| 康乐县| 荣昌县| 崇阳县| 吕梁市| 张掖市| 内江市| 蒲城县| 蕲春县| 五原县| 青冈县| 纳雍县| 兴文县| 喀什市| 泸水县| 平山县| 五台县| 无锡市| 准格尔旗| 汉中市| 南阳市| 祁东县| 巴彦县|