A new school year is approaching, which also means students will be taking tests. 

The tests in this kata are to be graded in different ways. A certain number of points will be given for each correct answer and a certain number of points will be deducted for each incorrect answer. For ommitted answers, points will either be awarded, deducted, or no points will be given at all.

Return the number of points someone has scored on varying tests of different lengths.

The given parameters will be:

* An array containing a series of `0`s, `1`s, and `2`s, where `0` is a correct answer, `1` is an omitted answer, and `2` is an incorrect answer.
* The points awarded for correct answers
* The points awarded for omitted answers (note that this may be negative)
* The points **deducted** for incorrect answers (hint: this value has to be subtracted)


**Note:**
The input will always be valid (an array and three numbers)


## Examples

\#1:
```
[0, 0, 0, 0, 2, 1, 0], 2, 0, 1  -->  9
```
because:
* 5 correct answers: `5*2 = 10`
* 1 omitted answer: `1*0 = 0`
* 1 wrong answer: `1*1 = 1`

which is: `10 + 0 - 1 = 9`

\#2:
```
[0, 1, 0, 0, 2, 1, 0, 2, 2, 1], 3, -1, 2)  -->  3
```
because: `4*3 + 3*-1 - 3*2 = 3`

Difficulty: introductory

Starter code:

def score_test(tests, right, omit, wrong):
	

Solutions:
def score_test(tests, right, omit, wrong):
    points = (right, omit, -wrong)
    return sum(points[test] for test in tests)


#returns test score
def score_test(tests, right, omit, wrong):
    final = 0
    for scores in tests:
        if scores == 0:
            final = final + right
        elif scores  == 1:
            final = final + omit
        elif scores == 2:
            final = final - wrong
    return final

#returns test score
def score_test(tests, right, omit, wrong):
    return tests.count(0) * right + tests.count(1) * omit - tests.count(2) * wrong 

#returns test score
def score_test(tests, right, omit, wrong):
    result = 0
    for score in tests:
        if score == 0:
            result += right
        elif score == 1:
            result += omit
        elif score == 2:
            result -= wrong
    return result


#returns test score
def score_test(tests, right, omit, wrong):
    #insert code here
    right_score = tests.count(0)*right
    omit_score = tests.count(1)*omit
    wrong_score = tests.count(2)*wrong
    return right_score + omit_score - wrong_score

def score_test(tests, right, omit, wrong):
  return sum( right if a==0 else omit if a==1 else -wrong for a in tests )

def score_test(t, r, o, w):
    
    return sum([r,o,-w][s]for s in t)

#returns test score
def score_test(tests: list, right: int, omit: int, wrong: int) -> int:
    right_count = tests.count(0)
    omit_count = tests.count(1)
    wrong_count = tests.count(2)
    return right_count * right + omit_count * omit - wrong_count * wrong

def score_test(tests, right, omit, wrong):
    awards = [right, omit, -wrong]
    return sum(map(awards.__getitem__, tests))