
    In an adaptive learning platform, students progress through challenge levels following a special pattern where each new level's difficulty (nth level) is determined by combining previous levels based on the Newman-Conway sequence rules. Design a function that calculates the difficulty rating for any given level n in this progressive learning system, where each level's value depends on the sum of two previous levels determined by the value of the level before it.
    

    
def sequence(n):
    """
    In an adaptive learning platform, students progress through challenge levels following a special pattern where each new level's difficulty (nth level) is determined by combining previous levels based on the Newman-Conway sequence rules. Design a function that calculates the difficulty rating for any given level n in this progressive learning system, where each level's value depends on the sum of two previous levels determined by the value of the level before it.
    

    """
def sequence(n):
    """
    In an adaptive learning platform, students progress through challenge levels following a special pattern where each new level's difficulty (nth level) is determined by combining previous levels based on the Newman-Conway sequence rules. Design a function that calculates the difficulty rating for any given level n in this progressive learning system, where each level's value depends on the sum of two previous levels determined by the value of the level before it.
    

    """
    if n == 1 or n == 2:
        return 1
    else:
        return sequence(sequence(n - 1)) + sequence(n - sequence(n - 1))