A challenge to write and get the o/p in a single line

September 21, 2010 at 3:16 am (Python)

<pedro3005>we can say that each letter has a number equivalent. a = 1, b = 2, etc. Write a program that takes in a name and outputs the sum of all numbers of the equivalent letters, in one line, not counting the “import” lines

<pedro3005> It must ignore spaces and be case-insensitive

<pedro3005> Mohan_chml, like “pedro” must be 58

Read the rest of this entry »

Permalink Leave a Comment