def input_integer(text_to_display):
    """
    This function will take input from the user check if the input is an integer or not.
    If its not, func will raise exception and let the user try again to input integer until
    user enter the integer.
    :param text_to_display:
    :return: integer
    """
    while True:
        try:
            num = int(input(f'{text_to_display}'))
            return num
        except ValueError:
            print('(ValueError) WARNING! Input should be an integer.')
        except Exception as e:
            print(e)
            continue