def continue_check(prompt):
    """
    This function will help to check if the input is either 'n', 'N', 'y', or 'Y' 
    to make sure computer get the right value to continue. 
    
    Otherwise the prompt will show up again untill you input a valid value or 
    forced to quit the program. 
    
    
    INPUT: 
        prompt: [string] the text shown on the terminal explaining what task to be continued. 

    OUTPUT: 
        check_value: [string] either 'n', 'N', 'y' or 'Y'. 
    
    Example: 
        check_value = continue_check('Do you want to continue this procedure? [Y/n]: ')
    """
    check_value = input(prompt)
    while True:
        try:
            if check_value not in ['n', 'N', 'y', 'Y']:
                error_message = (
                    "[Invalid input] please type 'y' as yes, or 'n' as no. ")
                print(error_message)
                raise ValueError(error_message)
            else:
                return check_value
        except ValueError:
            check_value = input(prompt)
            continue
