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,511
4,094
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,511
4,094
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

Ban my f**king IP address wrote on tcnqr's profile.
Error
Ban my f**king IP address wrote on SlinkyGnu05604's profile.
there is no wildd and caramel that they’re performing bans
Ban my f**king IP address wrote on Capitan's profile.
Ban my IP address and give me a network ban ngass
Reesle wrote on Flxen's profile.
Love the pfp & banner changes! 🔄
life often takes us on paths we don’t expect. the past couple months for me personally have been really hard due to struggles with mental health. i’m sorry for not being more active on the forums, or just cubecraft in general. i find it hard to enjoy anymore. i’ve stopped posting on youtube, and have been basically inactive on all other socials. hopefully things get better soon, i hope y'all are doing well.
Top Bottom