This is my error : Oops, try again. median() resulted in an error: unsupported operand type(s) for %: 'list' and 'int'
Can someone please help me with this? I don't have any idea on what to change
def median(x): newlist =  if range(1, len(x))%2!=0: listlength = range(1, len(x)+1) num = listlength / 2 middlenum = x[num] else: listlength = range(1, len(x)) num = listlength / 2 num2 = num + 1 middlenum = num2 + num / 2 return middlenum