def score_word(a, b):
    """ Scores a word relative to another word. Score is defined as
        the number of letters that match both in value and position."""
    return sum([a[i] == b[i] for i in range(len(a))])