Week8 - problem 6: difference in means - why?

Week 8, Problem 6

I get slightly different values (but enough to be significant, imho)

india = cd[:,2]
i25 = np.percentile(india, 25)
i50 = np.percentile(india, 50)
i75 = np.percentile(india, 75)
i100 = np.percentile(india, 100)
print(i25, i50, i75, i100)

175.0 216.0 273.0 499.0
§
np.mean(sd[india <= i100])
§
=> 39.87555555555556

§
qrs = np.percentile(india, [25, 50, 75, 100])
for i in range(4):
print(np.mean(sd[india < qrs[i]]))
§

19.672727272727272
28.18018018018018
31.688622754491018
=> 39.799107142857146

Why are these two different??