思维练习-12:输入数字,每次输入完成后输出算数平均数
程序员文章站
2022-05-20 21:56:10
...
total = 0
count = 0
while True:
number = int(input('请输入数字:'))
count = count + 1
total = total +number
print(total / count)