计算圆的面积
编写一个函数circle_area,接收圆的半径作为参数,返回圆的面积(使用πr²公式计算)。可以使用 math.pi 作为π的值。
πr²
math.pi
输入方式:
input()
输出方式:
print()
输入输出示例
# 输入: 10.0 # 输出: 314.16
# 输入: 2.5 # 输出: 19.63
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.
Using your Hydro universal account