Thursday, January 19, 2006

email reminded of school

Today I got a mail titled "Attitude for weekend", from our HR manager sent to all the staff, which said..
Guys – Just a little work on attitude. Have fun. Here is what you need to do. We all need to work on our attitude, don’t we?
  • If a = 1%, b = 2%, c = 3%, etcetera, what does ‘attitude’ add up to? ….. (Work it out & see for yourself – ask NO questions just think about it)
Cheers
This totally reminded me of the school programming assignments that we use to do (when you do programming 101 kinda subjects). Ok. . . since it reminded me of programming exercise, I did exactly the same.

#! /usr/bin/python

#
import string


alp=''

for per in range(97,123):

alp = alp + (chr(per))


didisaid = string.lower("attitude")

l = len (didisaid)

total=0


for cal in range(0,l):

c = didisaid[cal]

val = alp.find(c) +1

print c,"=",val

total = total + val


print "total value for :",didisaid," =",total,"%"



No comments: