
    Create a function that analyzes a student's writing sample by calculating the total number of possible meaningful word combinations and phrases that can be extracted from their text. This linguistic analysis helps evaluate the complexity and richness of the student's writing by considering all non-empty continuous sequences of characters in their submission. The function should process any length of text input while accounting for spaces and punctuation as part of valid substrings.
    

    
def number_of_substrings(str):
    """
    Create a function that analyzes a student's writing sample by calculating the total number of possible meaningful word combinations and phrases that can be extracted from their text. This linguistic analysis helps evaluate the complexity and richness of the student's writing by considering all non-empty continuous sequences of characters in their submission. The function should process any length of text input while accounting for spaces and punctuation as part of valid substrings.
    

    """
def number_of_substrings(str):
    """
    Create a function that analyzes a student's writing sample by calculating the total number of possible meaningful word combinations and phrases that can be extracted from their text. This linguistic analysis helps evaluate the complexity and richness of the student's writing by considering all non-empty continuous sequences of characters in their submission. The function should process any length of text input while accounting for spaces and punctuation as part of valid substrings.
    

    """
    str_len = len(str)
    return int(str_len * (str_len + 1) / 2)