def input_int(prompt: str, min_val: int = 1, max_val: int = 5) -> int:
    """Get an integer from the user"""
    while True:
        try:
            user_input = int(input(prompt))
            if min_val <= user_input <= max_val:
                return user_input
            print("Value not within range. Try again!")
        except ValueError:
            print("Invalid integer input. Try again!")