Why my code didn't pass


Can someone tell me why my code didn't pass please?

Median. My code needs to be tweaked somewhere

for the test case provided in the feedback message below line 7 is the reason why you did not pass run some more test cases for that block and use the result to correct it.


The hint tells us that the middle values for a list with an even number of elements are a[mid] and a[mid-1]. Your code has a[mid] and a[mid+1].