Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

* Question: displayCommonWords(paragraphs): this is the function that I am tryin

ID: 3667126 • Letter: #

Question

  * Question: displayCommonWords(paragraphs): this is the function that I am trying to make correct, any help will be helpful (Python 2.7). Ruturns a list of all common words that have appeared in 5 or more paragraphs.

def displayCommonWords(paragraphs):

matched = 0 #keeps tracks of number of paragraphs that have more than "freq" number of common words
    for para in paragraphs:
        found = 0
        for p in para:
             #keeps track of number of common words found in this paragraph
            if p in paragraphs:
               found+=1
        if found >= howmany: #freq
            matched+=1
    return matched

Explanation / Answer

This may helps to you solve the above given problem statement in python..