鉴于半球半径增加了固定百分比,因此目标是计算半球体积的增加百分比。
Examples:
Input :
20
Output :
72.8 %
Input :
70
Output :
391.3 %
方法:
令,半球的半径=
给定百分比增长=
增长前的数量=
增加后的新半径=
因此,新体积=
音量变化=
数量增加百分比=
以下是上述方法的Python代码实现。
# Python3 program to find percentage increase
# in the volume of the hemisphere
# if the radius is increased by a given percentage
def newvol(x):
print("percentage increase in the volume of the"
" hemisphere is ", pow(x, 3) / 10000 + 3 * x
+ (3 * pow(x, 2)) / 100, "%")
# Driver code
x = 10.0
newvol(x)
输出 :
percentage increase in the volume of the hemisphere is 33.1 %