Write a program that calculates the arithmetic mean. The arithmetic mean is the sum of all numbers divided by their total count.
Read an integer
n. This number tells you how many numbers you need to read next in a loop.Read exactly
nintegers, one per line, and calculate the arithmetic mean value of those integers.Print the mean as a float value.
In the examples below, you can see the input format: the first number shows how many times you need to read next in a loop (8, 3, and 1, respectively). The following integers represent numbers whose mean value you should calculate.
You can:
Store the first number (
n) in a variable.Call
input()inside aforloop exactlyntimes.