Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cpto(lvl,cap,goal):
- """
- Function to find out the amount of change points required to reach a level.
- Returns said amount.
- lvl: Starting level, and used as level tracking within function
- cap: The level at which CP required to reach next level stops increasing
- goal: The goal, self-explanatorily.
- """
- tot=0
- while not lvl==goal:
- if lvl<cap:
- tot+=(lvl+1)
- lvl+=1
- else:
- tot+=cap
- lvl+=1
- return tot
- print(cpto(0,50,77))
Advertisement
Add Comment
Please, Sign In to add comment