level 4
#例程1:
math = MATH()
print("%.5f %.5f\n",math.pi,math.e)
print("%.5e %.5e\n",math.pi,math.e)
a = 2*math.pi*10
print(a = %\n",a)
#例程2:
# math.sqrt(x)开平方函数
# 输入参数不能小于0
# 输出为x的开平方值,是浮点数
math = MATH()
a = math.sqrt(3)
print("%.3f\n",a)
# 保留3位小数
2024年07月24日 01点07分
1