No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
This program uses Python module re for splitting a text file into words and removing some common punctuation marks. The word:frequency dictionary is then formed using try/except. In honor of 4th of July the text analyzed is National Anthem of USA (found via Google). |
|
Write a function called NumDistinctDict that takes a single parameter alist that determines the number of distinct values in alist. For example, the list [1,2,4,2,7] contains 3 unique values (namely 1,2,4 and 7). |
|
I have a this bonus problem for class that I don't have a clue where to start. We have been using the cImage module and the question is: [B]Write a function called DrawTriangle that takes parameters img, x1, y1, x2, y2, x3, y3 and col, where col is a Pixel … |
|
I need to prompt a user to type in a text file name and then take that file and and count the amount of words in the file. I have this code which counts the words in a file(that may not be "perfectly" written). I cannot figure out how to … |