Today my colleague Omari Lawrence and I participated in the Teleios Code Jam Competition located at the DCIT Conference Room at UWI St.Augustine.

We had five(5) problems to solve in an hour, and we solved all of them with time to spare. One such problem is:

“Given a case-sensitive word of only letters, find the sum of its ASCII values.”

This is our solution to this problem in python:

def sumOfCharacter(word):
  count = 0 
  for i in word:
    count+=ord(i)
  return count

print(sumOfCharacter('Character'))
print(sumOfCharacter('characters'))
print(sumOfCharacter('Worcestershire'))