Skip to content
本站總訪問量
本站訪客數 人次

TQC+ 程式語言Python 104 圓形面積計算

題目說明:請撰寫一程式,輸入一圓的半徑,並加以計算此圓之面積和周長,最後請印出此圓的半徑(Radius)、周長(Perimeter)和面積(Area)。

提示1:需import math模組,並使用math.pi。 提示2:輸出浮點數到小數點後第二位。

範例輸入1

python
10

範例輸出1

python
Radius = 10.00
Perimeter = 62.83
Area = 314.16

範例輸入2

python
2.5

範例輸出2

python
Radius = 2.50
Perimeter = 15.71
Area = 19.63

Contributors

The avatar of contributor named as lucashsu95 lucashsu95

Changelog