#PYTHON TQC考題110_正 n 邊形面積計算
import math
n=eval(input()) #8邊形
#電子檔題目誤導為5邊形
s=eval(input()) #邊長或半徑=6
area=(n*s**2)/(4*math.tan(math.pi/n))
print(“Area = {:.4f}”.format(area))

import math
n=eval(input()) #8邊形
s=eval(input()) #邊長或半徑=6
area=(n*s**2)/(4*math.tan(math.pi/n))
area1=(n*math.pow(s,2))/(4*math.tan(math.pi/n))
#第二種作法,s的2次方
#math.pi就好,非math.pi() ,
#不能呼叫參數,不用()
print(“Area = {:.4f}”.format(area))
print(“Area1 = {:.4f}”.format(area1))
#第二種作法

#8邊形,邊長或半徑=6
#電子檔pdf排版有誤,未上標





![Python如何讀取*.jsonl (JSON Lines)? 讀取為List[dict] Python如何讀取*.jsonl (JSON Lines)? 讀取為List[dict]](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2023/10/20231024225613_30.png?quality=90&zoom=2&ssl=1&resize=350%2C233)



![Python: List[ pandas.Series ] 轉DataFrame技巧:正確理解row和column的關係,同 concat( List[ pandas.Series ], axis=1 ).T Python: List[ pandas.Series ] 轉DataFrame技巧:正確理解row和column的關係,同 concat( List[ pandas.Series ], axis=1 ).T](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2025/04/20250422150133_0_1cfa94.png?quality=90&zoom=2&ssl=1&resize=350%2C233)


近期留言