# qualification is 1,2,3 etc. depending on major qualification or number of skills/perk (1 for major qualification, 2 for first perk, and so on) qualification = 3 # current_skillpercent is current skill level in % current_skillpercent = 76 # nextskillpercent tells you how much XP is necessary to advance to the next percent, assuming 0 XP in this percent. nextskillpercent = 2**qualification*25*(100**(current_skillpercent/100.)) # finishing_perk should give you the XP necessary to advance this skill/perk to 100% finishing_perk(): for (current_skillpercent < 101) return nextskillpercent perk_to_100 = perk_to_100+nextskillpercent current_skillpercent = current_skillpercent+1 return current_skillpercent return perk_to_100 print perk_to_100
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question