Following from the previous kata and taking into account how cool psionic powers are compare to the Vance spell system (really, the idea of slots to dumb down the game sucks, not to mention that D&D became a smash hit among geeks, so...), your task in this kata is to create a function that returns how many power points you get as a psion [because psions are the coolest, they allow for a lot of indepth tactic playing and adjusting for psychic warriors or wilders or other non-core classes would be just an obnoxious core].

Consider both [the psion power points/days table](http://www.dandwiki.com/wiki/SRD:Psion#Making_a_Psion) and [bonus power points](http://www.d20pfsrd.com/psionics-unleashed/classes/#Table_Ability_Modifiers_and_Bonus_Power_Points) to figure out the correct reply, returned as an integer; the usual interpretation is that bonus power points stop increasing after level 20, but for the scope of this kata, we will pretend they keep increasing as they did before.

To compute the total, you will be provided, both as non-negative integers:

* class level (assume they are all psion levels and remember the base power points/day halts after level 20)
* manifesting attribute score (Intelligence, to be more precise) to determine the total, provided the score is high enough for the character to manifest at least one power.

Some examples:

```python
psion_power_points(1,0) == 0
psion_power_points(1,10) == 0
psion_power_points(1,11) == 2
psion_power_points(1,20) == 4
psion_power_points(21,30) == 448
```

*Note: I didn't explain things in detail and just pointed out to the table on purpose, as my goal is also to train the pattern recognition skills of whoever is going to take this challenges, so do not complain about a summary description. Thanks :)*

In the same series:

* [D&D Character generator #1: attribute modifiers and spells](https://www.codewars.com/kata/d-and-d-character-generator-number-1-attribute-modifiers-and-spells/)
* [D&D Character generator #2: psion power points](https://www.codewars.com/kata/d-and-d-character-generator-number-2-psion-power-points/)
* [D&D Character generator #3: carrying capacity](https://www.codewars.com/kata/d-and-d-character-generator-number-3-carrying-capacity/)

Difficulty: introductory

Starter code:

def psion_power_points(level,score):
	

Solutions:
psion_power_points=lambda l,s: [0,2,6,11,17,25,35,46,58,72,88,106,126,147,170,195,221,250,280,311,343][min(l,20)]+(s-10)//2*l//2 if l and s>10 else 0

powers = [0,2,6,11,17,25,35,46,58,72,88,106,126,147,170,195,221,250,280,311,343]
def psion_power_points(level, score):
    score = max(score - 10, 0)
    return level * score and score // 2 * level // 2 + powers[min(level, 20)]

power={1:2, 2:6, 3:11, 4:17, 5:25, 6:35, 7:46, 8:58, 9:72, 10:88,
       11:106, 12:126, 13:147, 14:170, 15:195, 16:221,
       17:250, 18:280, 19:311, 20:343}
def psion_power_points(level,score):
    if level==0 or score<=10:
        return 0
    return power.get(level,343)+level*((score-score%2)-10)//4

inc = {1:2,2:6,3:11,4:17,5:25,6:35,7:46,8:58,9:72,10:88,11:106,12:126,13:147,14:170,15:195,16:221,17:250,18:280,19:311,20:343}

def psion_power_points(level,score):
    
    if level > 0 and score > 10:
        base_points = inc.get(level,343)        
    else:
        base_points = 0   
    
    bonus_points = max(0,int((score - 10) // 2 * 0.5 * level))
    
    return base_points + bonus_points #if score > 11 else base_points

import math
def psion_power_points(level,score):
    day = [ 0,2,6,11,17,25,35,46,58,72,88,106,126,147,170,195,221,250,280,311,343]
    return  math.floor(level * (score//2-5) * 0.5) + ( day[level] if level <20 else 343) if score >10 else 0
    


power = [0, 2, 6, 11, 17, 25, 35,
         46, 58, 72, 88, 106, 126, 147,
         170, 195, 221, 250, 280, 311, 343]

def psion_power_points(level,score):
    if level == 0 or score <= 10: return 0
    return power[min(20, level)] + max(0, score-10)//2 * max(0, level)//2

def psion_power_points(level,score):
    power_list = [0, 2, 6, 11, 17, 25, 35, 46, 58, 72, 88, 106, 126, 147, 170, 195, 221, 250, 280, 311, 343]
    if level < 1 or score < 11:
        return 0
    else:
        bonus = int((score-10)//2*0.5*level)
        base_points = power_list[level] if level <= 20 else power_list[20]
        return bonus + base_points

power_points_per_day = [2, 6, 11, 17, 25, 35, 46, 58, 72, 88, 106, 126, 147, 170, 195, 221, 250, 280, 311, 343]

def psion_power_points(level, score):
    if score < 11 or level == 0: return 0
    
    modifier = (score - 10) // 2
    f = int(level * modifier * 0.5)
    
    level = min(20, level)
    
    return power_points_per_day[level - 1] + f    

powerPointsPerDay = [0,   2,   6,  11,  17,  25,  35,  46,  58,  72,  88,
                        106, 126, 147, 170, 195, 221, 250, 280, 311, 343]
def psion_power_points(level, score):
    # pppd: Power points per day
    # bpp: Bonus power points
    if score <= 10:
        return 0
    pppd = powerPointsPerDay[min(level, 20)]
    bpp = (score - 10) // 2 * level // 2
    return pppd + bpp

POINTS_PER_DAYS = [0, 2, 6, 11, 17, 25, 35, 46, 58, 72, 88, 106, 126, 147, 170, 195, 221, 250, 280, 311, 343]

def psion_power_points(level,score):
    abilityModifier_atLvl20 = max(0, (score-10)//2*10)
    modifier = int(level * abilityModifier_atLvl20 / 20)
    return 0 if score < 11 else POINTS_PER_DAYS[min(level, 20)] + modifier