def get_input(min_value, max_value) -> int:
    """ Returns a number, if one got 'inputted'.
    Might throw a KeyboardInterrupt.

    Args:
        min_value: lower bound
        max_value: upper bound

    Returns:
        int: number between min_value and max_value inclusive

    Throws:
        KeyboardInterrupt, if the user intends to end inputting values
    """
    try:
        inp = input()
    except EOFError:
        raise KeyboardInterrupt("exiting")

    lower = inp.lower()
    if lower == "exit" or lower == "end" or not lower:
        raise KeyboardInterrupt("exiting")

    try:
        index = int(inp)
        assert index >= min_value
        assert index <= max_value
    except (ValueError, AssertionError):
        print(
            "Please enter '1', '2' or '3' to select one of the presented values, or '0' if they are of equal value to you."
        )
        return get_input(min_value, max_value)  # this might lead to a very unlikely
        # 'recursion limit error' when repeated more than 5k times.
    return index