陳紹綸python math random
陳紹綸python math random
5月 11, 2023
w3schools學習python math random函式庫
import math #劉任昌 輸入數學函式庫
import random #輸入亂數資料庫
x = math.sqrt(2)
print(x)
#大樂透是49個號碼開出六個
for i in range(6):
x = random.randint(1,49)
print("開出的第 " + str(i+1) + " 個號碼: " + str(x))
#str是將數字轉成字串string
w3schools學習python math random截圖
亂數函數主要用在蒙地卡羅模擬分析,用於衍生性金融商品的訂價。
僅拷貝 沒有做
回覆刪除