The Life Up app employs a sophisticated leveling system to quantify and encourage skill development, capped at level 1000, with progression becoming exponentially more challenging as one advances. Each skill, such as Guts, is associated with titles that signify major milestones in development. These titles, encapsulated in brackets like (Bold), act as markers of achievement and growth.
Based on The Power Law of Practice, each progress feels exponentially harder than before. Which means the progress should reflect that as well.

$$ \text{Experience Needed}_i = \text{Max Level}\times(1-\exp^{-ik}) $$
$$ Where: \newline \text{Max Level} = 1000 \newline i = \text{level}\newline k = 0.012317066 \newline \text{Max Experience} = 12,317,066 $$
Your function can be represented as equations rather than code. A minimal translation could look like this:
$$ \text{title milestone} = \begin{cases} \text{True}, & x \in \text{anchor steps} \\ \text{False}, & \text{otherwise} \end{cases}
$$
If it is a milestone,
$$ \text{xp}(x) = y_x
$$
Otherwise, define
$$ \text{Ladder Step} = \left\lfloor \dfrac{x}{\text{Step Range}} \right\rfloor
\newline \text{Start Range} = \text{Ladder Step} \times \text{Step Range}
\newline \text{End Range} = (\text{Ladder Step}+1)\times \text{Step Range}
$$
Where:
$$ \text{Anchor Range} \in [10, 31, 100, 361, 1000] \newline \text{Step Range} = 100 $$
The total XP inside the range is
$$ \text{Total Exp} = \{\, y_i \mid \text{Start Range} < i < \text{End Range} \,\}
$$
The experience needed is then the average: