如果运行下面的程序时 从键盘上输入's' 那么程序的输出结果是()。 import math a=3 b=4 c=5 t=inp

大学网课 已帮助 人

如果运行下面的程序时,从键盘上输入"s",那么程序的输出结果是()。 import math a=3 b=4 c=5 t=input("输入要求哪种形状的面积 t(三角形) s(正方形) c(圆):") if t=="t": s=(a+b+c)/2.0; area=math.sqrt(s*(s-a)*(s-b)*(s-c)) print("三角形面积={:.2f}".format(area)) elif t=="s": area=b*b print("正方形面积={:.2f}".format(area)) elif t=="c": area=3.14*c*c print("圆面积={:.2f}".format(area)) else: print("类型有误")

A.三角形面积=6.00

B.正方形面积=16.00

C.圆面积=78.50

D.类型有误

如果运行下面的程序时 从键盘上输入's' 那么程序的输出结果是()。 import math a=3 b=4 c=5 t=inp

热搜:下面程序的功能是输出数组s中最大元素