I got an interesting forward from my dad today. Usually I don't read bulky Powerpoints, but this one was actually quite neat, so I thought I'd share it with everyone. The PPT was about “What do we need to get 100% out of life?” and the logic went something like this – lets say we encode each letter in the alphabet with its position. So A would be 1, B would be 2, Z would be 26 and so on. You get the idea. This is where the interesting bit begins – what we'll do is, take a few words which seem important in life to us, and just add up the numbers to see how they fare:
-
LUCK: L + U + C + K = 12 + 21 + 3 + 11 = 47%
-
LOVE: L + O + V + E = 12 + 15 + 22 + 5 = 54%
-
MONEY: M + O + N + E + Y = 13 + 15 + 14 + 5 + 25 = 72%
-
KNOWLEDGE: K + N + O + W + L + E + D + G + E = 11 + 14 + 15 + 23 + 12 + 5 + 4 + 7 + 5 = 96%
-
LEADERSHIP: L + E + A + D + E + R + S + H + I + P = 12 + 5 + 1 + 4 + 5 + 18 + 19 + 8 + 9 + 16 = 97%
-
HARDWORK: H + A + R + D + W + O + R + K = 8 + 1 + 18 + 4 + 23 + 15 + 18 + 11 = 98%
-
ATTITUDE: A + T + T + I + T + U + D + E = 1 + 20 + 20 + 9 + 20 + 21 + 4 + 5 = 100%
I thought it was pretty neat. And some good food for thought.
BTW, here's the Python snippet I wrote to generate the above:
import sys base = 64 sum = 0 letters = '' numbers = '' for i in sys.argv[1]: sum += ord(i) - base letters += i letters += ' + ' numbers += str(ord(i) - base) numbers += ' + ' print "%s = %s = %d%%" % (letters[:-3], numbers[:-3], sum)
Update: A slightly shorter, but perhaps more elegant way of doing the same thing:
import sys word = sys.argv[1] s = reduce(lambda x,y: x + (ord(y) - 64), word, 0) l = reduce(lambda x, y: x + ' + ' + y, word) n = reduce(lambda x,y: x + ' + ' + str(ord(y)-64), word, '') print "%s = %s = %d%%" % (l, n[2:], s)
2 Comments
Definitely NOT more elegant.
@jon: :-)