Question: Objective: Practice using all the skills and topics learned in class to answer a question. Description: In this assignment we examine a set of words

Objective: Practice using all the skills and topics learned in class to answer a question.

Description: In this assignment we examine a set of words in a file to extract information about the frequency of letters. The file zingarelli2005.txt contains a large number of words in Italian. This is an important step for certain decryption techniques, thus it is useful to know how frequently letters occur in a given file.

Your program must meet the following requirements:

1. Your program should read in all the text from zingarelli2005.txt. Provide a warning if this file does not exist. No user input is required.

2. Your program should tally up the occurrences of the letters in the words from the file. 3. Your program should output the percent frequency for letters among all the words in the file,

displayed to three decimal places, with the decimal points aligned. Example Output: The letter frequencies are:

A - 11.515% B - 1.837% C - 5.126% ...and so on for all the letters. 

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!