Explore Library
Code QuizIntermediate

Percentile Scale Confusion

Spot why this 90th-percentile call returns the wrong value.

Codepython
import numpy as np

data = np.arange(1, 101)  # 1..100
# Goal: the 90th percentile
p90 = np.percentile(data, 0.9)
print(p90)

What is the bug in this code?