Quantcast
Channel: Finding the average of a list - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Answer by Paulo YC for Finding the average of a list

$
0
0

I had a similar question to solve in a Udacity´s problems. Instead of a built-in function i coded:

def list_mean(n):    summing = float(sum(n))    count = float(len(n))    if n == []:        return False    return float(summing/count)

Much more longer than usual but for a beginner its quite challenging.


Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>