Starting from:
$30

$24

Read-File Program Solution

Write a program to read data from a string and a file (smu.text) and convert them into a list of words. Write a function called readfile() that reads text from smu.text and convert them into list of words. Write another function called word_freq ( ) that accepts list

of words and count number of words in the list and then create a dictionary to hold words as keys and count as values (key-value pair).

Write another function called word_no_duplicate (items) that accepts list of words and return a set of words. Write another function called dic_no_duplicate (dict) that accepts a dictionary and return a set of words. smu.txt file is enclosed, and you can download from the canvas.

More products