This assignment aims to investigate how often candidates repeat the same phrases by analyzing n-grams in their speeches. The goal is to create a function called calculate_ngram_frequencies that takes two arguments: a string of text and an integer n, which registers all sequences of words of length n in the text and returns them as a dictionary. The function should only search for n-grams within sentences. Additionally, the assignment asks to call this function with n=6 on the clinton_speeches_all and trump_ speeches_all files, and save the results in two variables called clinton_6gram_dict and trump_6gram_dict, respectively. Finally, it requires to sort these 6-grams by frequency and print out the 10 most frequent 6-grams for both Clinton and Trump.