The mean

Report a typo

Given a numeric sequence at the input, create a list in which each number will be a digit from this input string. Then use this list to calculate the arithmetic mean, that is, the sum of all the digits divided by their total count.

Don't forget to print your result.

Tip: Here is a simple formula to help you: mean=sum(digits_list)len(digits_list)mean = {sum(digits\_list) \over len(digits\_list)}. Make use of the respective built-in functions, sum() and len(). They can operate on digits_list you've created.

Sample Input 1:

123

Sample Output 1:

2.0

Sample Input 2:

1

Sample Output 2:

1.0
Write a program in Python 3





___

Create a free account to access the full topic