def _hexprints(n):
    """
    Returns a hex sting of length 2 that represents the number n
    :raises ValueError if 0 > n or n > 255
    :param n: int
    :return: string
    """
    if isinstance(n, str):
        n = ord(n)
    if 0 > n or n > 255:
        raise ValueError('n(' + str(n) + ") doesn't fit for _hexprints")
    if n > 15:
        return hex(n)[2:]
    else:
        return '0' + hex(n)[2:]
