A mean of n

Report a typo

Write a program that calculates the arithmetic mean. The arithmetic mean is a sum of all numbers divided by their total count.

The input format:

Read an integer number n. This is a number of integer values you will receive on the next n lines.

Your program should compute the mean value of those n integers.

The output format:

Print the mean as a float number.

You can save n to a variable and then call the input() function exactly n times using for loop.

Sample Input 1:

8
5
-7
6
2
5
5
-7
-10

Sample Output 1:

-0.125
Write a program in Python 3





___

Create a free account to access the full topic