python计算3个数的平均数
# 请在 ___ 划线处,替换成你的代码
# 输入三个浮点数
a=int(input())
b=int(input())
c=int(input())
# 计算平均值
average = (a + b + c) / 3
# 打印结果
print(average)
为什么错了?(Runtime Error)跪求各位大佬指教!
python计算3个数的平均数
# 请在 ___ 划线处,替换成你的代码
# 输入三个浮点数
a=int(input())
b=int(input())
c=int(input())
# 计算平均值
average = (a + b + c) / 3
# 打印结果
print(average)
为什么错了?(Runtime Error)跪求各位大佬指教!
我看题主给的问题,原题应该是要输入三个浮点数,但代码里int是指整数,应该改成float

代码如下:
# 请在 ___ 划线处,替换成你的代码
# 输入三个浮点数
a = float(input())
b = float(input())
c = float(input())
# 计算平均值
average = (a + b + c) / 3
# 打印结果
print(average)