File "python", line 6
SyntaxError: invalid syntax
Really new at python and have no much clue what is going on. Would really appreciate any help with what went wrong with the code. Thanks!!
def median(chunk): refined = sorted(chunk) mid_point = len(refined) / 2 if mid_point % 2 == 0: return ((refined[mid_point - 1] + (refined[mid_point]) / 2.0) else: return (refined[(mid_point + 1) / 2.0])