How to convert skywars xp to levels (using python )

So, my last post highlighed how to convert treasure wars xp to level using python (and java), so I’ll do it again for skywars. Skywars is a bit easier, as there is no level cap, so the amount to the next level keeps increasing.

xps = [0, 150]
    x = 150
    y = 150
    for i in range(98):
        x = x+150
        y = int(x + y)
        xps.append(y)
        i += 1
    for i in range(len(xps)):
        if xp > xps[i]:
            exactlevel = i + float(xp - xps[i-1]) / (xps[i] - xps[i-1])

I posted this in the wrong section last time so this is a repost

you could’ve edited your original post instead

I dont know python sadly i only know c# and c++
Wait im dumb