import string

def buildCoder(shift):
    """
    Returns a dict that can apply a Caesar cipher to a letter.
    The cipher is defined by the shift value. Ignores non-letter characters
    like punctuation, numbers and spaces.

    shift: 0 <= int < 26
    returns: dict
    """
    ### TODO.
    diLower = {}
    s = string.ascii_lowercase
    for i in range(len(s)):
        if i < len(s) - shift:
            diLower[s[i]] = s[i + shift]
        else:
            diLower[s[i]] = s[i + shift -26]

    diUpper = {}
    S = string.ascii_uppercase
    for j in range(len(S)):
        if j < len(S) - shift:
            diUpper[S[j]] = S[j + shift]
        else:
            diUpper[S[j]] = S[j + shift -26]

    di = diLower.copy()
    di.update(diUpper)
    return di