import random


def randnum(x, y):
    """
    Generate a random int between x (inclusive) and y (exclusive)

    Args:
        x (int): inclusive lower bound
        y (int): exclusive upper bound

    Returns:
        int: random number
    """
    assert isinstance(x, int)
    assert isinstance(y, int)
    assert y - x < 2147483648, "Range too large" # 2 ** 31
    return random.randrange(x, y)