Lab 12: Compute the most frequently used words from the text file
Problem statement
Write a Python program to compute the most frequently used words from the text file.
Solution Key
CloudCoder Exercise
To be created.
Pre Lab Questions
Why is
max
value is initialised to0
?What is the purpose of
counter={}
?What will the
split()
function do?
Post Lab Questions
What are the other
inbuilt
Python functions that can be used for this program?How do you give the input directly in the program instead of taking the input from
.txt
file?
Bonus 1
Related Material
CD Material: http://10.100.8.8/kata/edit/AF5211CDC2?avatar=fox
PreviousLab 11: Programs that take command line argumentsNextLab 12: Find the most frequent words in a text read from a file
Last updated