def level(score):
    """Given a value in C-equivalent LOCs, returns the level."""
    if score == 0:
        return 0
    l_gen = make_level_generator()
    while True:
        level, xp = next(l_gen)
        if score < xp:
            return level - 1
dataset/ETHPy150Open the-xkcd-community/the-red-spider-project/src/level_up.py/level/original