An alphabet position quickie to motivate us all

0

It has been said, or copied from http://ifunny.co/fun/SiQ7PlRR3 rather, that if...

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

equals...

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 

then...

 K +  N +  O +  W +  L + E + D + G + E
11 + 14 + 15 + 23 + 12 + 5 + 4 + 7 + 5 = 96%

H + A +  R + D +  W +  O +  R + K
8 + 1 + 18 + 4 + 23 + 15 + 18 + 11 = 98%

Both are important, but fall just short of 100%, but...

A +  T +  T + I +  T +  U + D + E
1 + 20 + 20 + 9 + 20 + 21 + 4 + 5 = 100%

The program will take as its input a string containing only letters and will output the sum of the alphabet values as listed above.

Test cases

LAZINESS
==> 105

NEGATIVITY
==> 132

PROCRASTINATION
==> 192

SELLING YOUR SOUL TO SATAN
==> 314

This is code golf, so the shortest program in bytes wins.

A. Burnheimer

Posted 2015-12-01T16:08:02.043

Reputation: 1

Question was closed 2015-12-01T16:24:22.070

1Is this [tag:code-golf] or what ? – Paul R – 2015-12-01T16:12:50.563

1Why is it a percentage? Isn't the end result just the sum of the values? – Brian – 2015-12-01T16:19:45.387

1

Definitely dup of Finding the Value of Words!. Thank you for sharing!

– A. Burnheimer – 2015-12-01T16:22:33.817

No answers