
    Write a function to determine if a student's learning pattern score represents an undulating learning style, where they consistently alternate between exactly two difficulty levels throughout their learning journey. The score is considered undulating if all adjacent digits alternate between exactly two distinct values, helping identify students who may benefit from oscillating content difficulty in their personalized learning path.
    

    
def is_undulating(n):
    """
    Write a function to determine if a student's learning pattern score represents an undulating learning style, where they consistently alternate between exactly two difficulty levels throughout their learning journey. The score is considered undulating if all adjacent digits alternate between exactly two distinct values, helping identify students who may benefit from oscillating content difficulty in their personalized learning path.
    

    """
def is_undulating(n):
    """
    Write a function to determine if a student's learning pattern score represents an undulating learning style, where they consistently alternate between exactly two difficulty levels throughout their learning journey. The score is considered undulating if all adjacent digits alternate between exactly two distinct values, helping identify students who may benefit from oscillating content difficulty in their personalized learning path.
    

    """
    n = str(n)
    if len(n) <= 2:
        return False
    for i in range(2, len(n)):
        if n[i - 2] != n[i]:
            return False
    return True