anoldmaninthesea
I'm trying to solve the following challenge
https://www.hackerrank.com/challenges/s10-weighted-mean/problem?h_r=next-challenge&h_v=zen
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
anoldmaninthesea
Instead of return, I should have 'printed' the result and not 'returned' the result.