add tag
I'm trying to solve the following challenge

On my jupiter notebook the following function solves it:
def weightedMean(X, W):  
     # Write your code here  
     dotprd=sum([x*w for (x,w) in zip(X,W)])  
     return dotprd/sum(W)

However, on the site of the challenge, my function returns nothing... 

> ~ no response on stdout ~

why is that?

Top Answer
Instead of return, I should have 'printed' the result and not 'returned' the result.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.