Question
NEED THIS ASAP THANK YOU Q-2: Implement the following function (see below for notes about languages): Accept an argument of .txt and perform a statistical
NEED THIS ASAP THANK YOU Q-2: Implement the following function (see below for notes about languages): Accept an argument of .txt and perform a statistical analysis giving the frequency of the letters a-z and treat A-Z as lower case values and include their appearances in the total count as well. Ignore all other characters. The output should be each letter and the ratio of the number of letters counted / total number of letters in file. To answer the next question you may want to include a function to keep track of the order of frequency as well but this is not absolutely necessary. RETAIN THIS CODE for future use.
Q-3: Using the function perform a statistical analysis on the files supplied lorem.txt, words.txt and a1.txt. Provide the output result for a1.txt here. What are the 3 most common letters in each text file samples? Are the results identical for each sample, if not, what cause could there be for the differences?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started