在列表中输入多个数据作为圆的半径,(键盘输入,以逗号分开),计算输出相应的圆的面积,并求出最大值、最小值,圆周率为3.14,结果保留2位小数。
输入圆的半径,逗号分隔。
输出相应的圆的面积,并求出最大值、最小值。
在这里给出一组输入。例如:
1.1,2.2,3.3
在这里给出相应的输出。例如:
the area of the circle with the radius of 1.100000 is : 3.80
the area of the circle with the radius of 2.200000 is : 15.20
the area of the circle with the radius of 3.300000 is : 34.19
max area is : 34.19
min area is : 3.80
radius = list(map(eval,input().split(",")))
s = [3.14*r*r for r in radius]
for ss,r in zip(s,radius):
print(f"the area of the circle with the radius of {r:.6f} is : {ss:.2f}")
print(f"max area is : {max(s):.2f}")
print(f"min area is : {min(s):.2f}")
?