Minecraft PC IP: play.cubecraft.net

FiredMercury21

Novice Member
Aug 21, 2020
187
145
44
I made some python code!
It can:
Find the exp required to get to a certain level
Find the exp required to get to a level from another level
Find which level you get to from another level with a certain amount of exp
PS - It's for vanilla and skyblock.

Warning: I haven't really cleaned it up, so if you enter a weird value, it might break.

Here's the code:
Python:
def findexp(var):
    if var < 32:
        expval = 2.5 * var ** 2 - 40.5 * var + 360
        if var < 16:
            expval = var ** 2 + 6 * var
    if var > 31:
        expval = 4.5 * var ** 2 - 162.5 * var + 2220
    return expval


def dif(var2, var3):
    expval3 = findexp(int(var2))
    expval4 = findexp(int(var3))
    expdif = expval4 - expval3
    return expdif


def reverse(var4, var5):
    expval5 = findexp(var4)
    expval6 = expval5 + var5
    expval7 = 0
    level = 0
    while expval7 < expval6:
        level = level + 1
        expval7 = findexp(level)
    return level


print('1 - Find the exp required to get to a certain level.')
print('2 - Find the exp required to get to a level from another level')
print('3 - Find which level you get to from another level with a certain amount of exp')
question = int(input('Which would you like to use? '))
if question == 1:
    q1 = int(input('Which level do you want to get to? '))
    print('You need', str(findexp(q1)), 'experience.')

if question == 2:
    q2 = int(input('What is the starting level? '))
    q3 = int(input('Which level do you want to get to? '))
    print('You need', str(dif(q2, q3)), 'experience.')

if question == 3:
    q4 = int(input('Which level are you on? '))
    q5 = int(input('How much experience? '))
    print('You can get to level', str(reverse(q4, q5)), '.')
 
Last edited:

Fesa

Quality Assurance
Team CubeCraft
🧪 Quality Assurance
💌 Customer Support
Oct 17, 2016
1,512
4,096
349
Yoitsu
Pronouns
She/Her
Euh, it's wrong...
 

bloodynoah

Member
Dec 10, 2020
12
7
4
18
I made some python code!
It can:
Find the exp required to get to a certain level
Find the exp required to get to a level from another level
Find which level you get to from another level with a certain amount of exp

Warning: I haven't really cleaned it up, so if you enter a weird value, it might break.

Here's the code:
Python:
def findexp(var):
    if var < 32:
        expval = 2.5 * var ** 2 - 40.5 * var + 360
        if var < 16:
            expval = var ** 2 + 6 * var
    if var > 31:
        expval = 4.5 * var ** 2 - 162.5 * var + 2220
    return expval


def dif(var2, var3):
    expval3 = findexp(int(var2))
    expval4 = findexp(int(var3))
    expdif = expval4 - expval3
    return expdif


def reverse(var4, var5):
    expval5 = findexp(var4)
    expval6 = expval5 + var5
    expval7 = 0
    level = 0
    while expval7 < expval6:
        level = level + 1
        expval7 = findexp(level)
    return level


print('1 - Find the exp required to get to a certain level.')
print('2 - Find the exp required to get to a level from another level')
print('3 - Find which level you get to from another level with a certain amount of exp')
question = int(input('Which would you like to use? '))
if question == 1:
    q1 = int(input('Which level do you want to get to? '))
    print(str(findexp(q1)))

if question == 2:
    q2 = int(input('What is the starting level? '))
    q3 = int(input('Which level do you want to get to? '))
    print(str(dif(q2, q3)))

if question == 3:
    q4 = int(input('Which level are you on? '))
    q5 = int(input('How much experience? '))
    print(str(reverse(q4, q5)))
hmmm
 

Ellie Williams

Forum Veteran
Jan 6, 2016
3,134
5,397
513
University of Eastern Colorado
tehc.png
 
  • Haha
Reactions: FiredMercury21

Fesa

Quality Assurance
Team CubeCraft
🧪 Quality Assurance
💌 Customer Support
Oct 17, 2016
1,512
4,096
349
Yoitsu
Pronouns
She/Her
Hi, sorry for taking so long to get back to you. Could you show me a screenshot of what you were doing? I'm pretty sure it should work.
I did
1 - enter
Because I wanted to know the xp for lvl 20
Then I did
20 - enter
Then it said
550.0

That really wrong
I also have no clue were the formulas you used came from + why they’re different for <>32 as the needed xp for a level is simply a row with v = 200
 

FiredMercury21

Novice Member
Aug 21, 2020
187
145
44
I did
1 - enter
Because I wanted to know the xp for lvl 20
Then I did
20 - enter
Then it said
550.0

That really wrong
I also have no clue were the formulas you used came from + why they’re different for <>32 as the needed xp for a level is simply a row with v = 200
I took the calculations from the official minecraft wiki, and it also says 550 is correct for level 20
Here's the link: https://minecraft.gamepedia.com/Experience
 
Members Online

Members online

Latest profile posts

CrystalLegend01 wrote on NADER KANAAN's profile.
Happy Birthday!
coolzombiee wrote on NADER KANAAN's profile.
Happy birthday!
IMG_1809.jpg
IMG_1810.jpg

Never playing na op again........
Note: the game was Sky Wars Mega, the map was Lucky, and loot was OP
Top Bottom