The function assigns a numerical value to each input string. It appears that the value assigned is based on the alphabetical order of the characters contained in the string. 

