CMSC 201 |
Lab 12: DictionariesDictionariesRemember, before running each program type: scl enable python33 bash ProgramLetter Frequencies Letter frequencies can be useful for cracking codes in cryptoanalysis or for making efficient compression algorithms. In today's lab, you are going to compare letter frequencies for the Wikipedia page on Pablo Picasso, written in different languages. We have provided files with the text from each page in French, Spanish, Portuguese, Italian, German, and English. Steps: Download the text files below. Put them in the same directory that you will be writing today's program in.
The last file, fileslist.txt, contains the name of each file on a single line. You are going to use fileslist.txt to open each of the language files for analysis, one at a time.
Sample Output english_picasso.txt a: 2741 e: 3327 i: 2637 o: 2311 u: 822 french_picasso.txt a: 2676 e: 4494 i: 2262 o: 1626 u: 1653 italian_picasso.txt a: 2799 e: 2639 i: 2979 o: 2305 u: 837 portuguese_picasso.txt a: 3083 e: 2704 i: 1573 o: 2358 u: 986 spanish_picasso.txt a: 10673 e: 11255 i: 6034 o: 7239 u: 3788 german_picasso.txt a: 5177 e: 11880 i: 6482 o: 2856 u: 3235 |