先求平均值78.6,再输出一句“平均成绩是:78.6”,要怎么输出呢
# coding=UTF-8
L = [75, 92, 59, 68, 99]
sum=0.0
for ch in L:
sum=sum+ch
print(sum)
a=sum/5
s='平均值是:'
print(?)
L = [75, 92, 59, 68, 99]
sum = 0.0
for ch in L:
sum = sum + ch
a = sum / 5
print('平均成绩是' + str(a))
翻译
搜索
复制
print(s,a)