def bp_from_digit(digit):
    """ Inverse of dna_digit.

        >>> bp_from_digit(3)
        't'
        >>> bp_from_digit(7)
        Traceback (most recent call last):
            ...
        ValueError: only 0, 1, 2, or 3 accepted
    """
    # You must use the following dictionary:
    bp_map = {0: 'a', 1: 'c', 2: 'g', 3: 't'}

    if digit in bp_map:
        return bp_map[digit]    # returns only values with corresponding keys
    else:
        raise ValueError("only 0, 1, 2, or 3 accepted")