* 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..
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.