def return_int(user_input):
    """Function to check and return an integer from user input"""
    try:
        user_int = int(user_input)
    except ValueError:
        print("Oops! Not a valid integer format.")
    else:
        return user_int