Question: python3.6 Write a function many() that takes as input the name of a file (as a string) and prints the number of words of a

python3.6

Write a function many() that takes as input the name of a file (as a string) and prints the number of words of a given length. You can assume that the file has no punctuation marks at all. File sample.txt is provided to you on D2L. Hint: use a dictionary many(f) f:string, return: NoneType >>> many("C:/Users/Radha Jagadeesan/Box Sync/classes/CSC241/Radha/Exams/FINALFOLDER/example.txt") words of length 1 :2

words of length 2 :2

words of length 3 :4

words of length 4 :6

words of length 5 :5

words of length 10 :1

C:\Users\CLIU76\Downloads\example.txt

The 3 lines in this file end with the new line character.

There is a blank line above this line.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!