File "python", line 8
elif l == 1:
SyntaxError: invalid syntax
Hello all, I'm sure there is something very simple here I am missing, but I am banging my head on my desk! Help?
NOTE: I am just looking for help with this syntax error. if my code will not produce the results for the answer I would prefer to solve it myself. Thanks in advance!!
def median(x): new = sorted(x) l= len(x) if l % 2 == 0: median = ((x[((l / 2) - 1)] + x[((l / 2) + 1)]) / 2) else: median = x[l / 2] elif l == 1: median = x return median