Subtask 3.1: Counting letters Create a containerletter_countsof…

Question Answered step-by-step Subtask 3.1: Counting letters Create a containerletter_countsof… Subtask 3.1: Counting letters Create a container letter_counts of length 52 that counts how many of each letter ‘a’,’b’,…,’z’,’A’,’B’,…,’Z’ that exist within the excerpt. Note that 0 is a valid count for the number of times a letter appears. Create a container letter_counts_ignore_case of length 26 that counts all letters ignoring the capitalization. That is, for example, ‘a’ and ‘A’ should be counted as the same letter.NotesIt is valid for a letter to count 0 times. Don’t ignore these letters.Subtask 3.2: Average word length Save the average word length within the excerpt to the variable average_word_length.NotesAll punctuation should be ignored.Numbers should be counted as characters. That is ’22d’ is a word of length 3.Subtask 3.3: Unique words Save the number of unique words — case insensitive — to a variable num_unique_words.Subtask 3.4: Longest word Save the longest word — all of them if there’s a tie — in a list called longest_words. Even if there’s only one longest word, this variable still must be a list.Task 4: Airport flight dataSubtask 4.1: Import a csv Download the comma-separated values (csv) file airports.csv  Download airports.csv. Use the following code to import a csv file as a list of dictionaries.import csvinput_file = csv.DictReader(open(“airport.csv”))airports = []for row in input_file: airports.append(row) You may notice that each of the integers are read as strings. You may need to convert numerical values to the correct data type.This data set contains data on all 135 medium and large airports in the US in 1990.(Dataset: “US Airport Statistics,” submitted by Larry Winner, University of Florida. Dataset obtained from the Journal of Statistics Education (http://www.amstat.org/publications/jse (Links to an external site.)). Accessed 3 June 2015. Used by permission of author.)Subtask 4.2: Scheduled vs Actual Departures Create a sub-list of airports called less_scheduled. This new list, less_scheduled, should contain the dictionaries of every airport for which the number of scheduled departures was less than the number of departures performed.Subtask 4.3: Mean of a Subset Using your list from Subtask 4.2, find the average number of passengers per performed flight from all the airports in Subtask 4.2. Save the result to the variable mean_pass. You are not allowed to use the mean function — there’s value in knowing how to implement it yourself.           Computer Science Engineering & Technology Python Programming DS 710. Share QuestionEmailCopy link Comments (0)