Coding Error with statistics interview questions

Status
Not open for further replies.
I'm having a problem with the code for statistics interview questions from here. I am getting an error when I try to run the code. The error message I'm seeing is:
"SyntaxError: invalid syntax (line 5, col 4)"
Here is a snippet of the code I'm running:

Code:
def find_mean(arr):
    sum = 0
    for element in arr
        sum += element
    return sum/len(arr)

Any help in resolving this issue would be greatly appreciated. Thanks!
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…