Tenpin bowling scores can range from 0 (all gutter balls) to 300 (a perfect game).
A complete record of a 10 frame bowling game can be given as a list of the number of pins knocked down by each ball in sequence from the beginning to the end of the game.
Create a function whose argument is such a list. The function should return the final score.
bowling([10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) ➞ 300
bowling([4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) ➞ 80
bowling([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) ➞ 150
bowling([10, 5, 5, 10, 5, 5, 10, 5, 5, 10, 5, 5, 10, 5, 5, 10]) ➞ 200
The number of balls thrown for a complete game can vary from 12 to 21 depending on the number of strikes and spares thrown.