#Python TQC考題104
import math
radi=eval(input())
PI=math.pi
peri=2*PI*radi
area=PI*radi**2
print(“Radius = {:.2f}”.format(radi))
print(“Perimeter = {:.2f}”.format(peri))
print(“Area = {:.2f}”.format(area))
Spyder執行結果
r = eval(input())
import math
PI = math.pi
peri = 2*PI*r
area = PI*r**2
print(“Radius = %.2f” %r)
print(“Perimeter = %.2f” %peri)
print(“Area = %.2f” %area)
#Perimeter , Area 如果變數命名得跟print()一樣
#可以複製貼上省一點點時間