Question: (+25) Using the list a defined below, write a Python program that will 1. Display a string that consists of the first letter and last





(+25) Using the list a defined below, write a Python program that will 1. Display a string that consists of the first letter and last letter from each of the names in the list a The output should look like "EdAsNn etc. use the operator or the appd() functionfrom en prior lab 2. Display list a with all the names reversed that is display "dilcuE", sedemihcrA" etc. 3. 4. Display the total number of characters in the list a Hint: Sum the lengths of each name In the prior lab we determined the number of vowels in the list. For this lab, display the number of consonants (non-vowels) Use your/result from 3. to assist in the calculations 5. Display the number of each letter in the list NOTE ignore case 'A and 'a' are to be considered the same. See code below starts with alphaCnt (There are eight A' in the list) as well as the code print('1',ord('A)-ord(A")) print('2 ,grd('B')-ord('A)) print(3',ord('C')-ord( A')) print( 26 ',rd(Z')-ord( A')) Suggested output Number of A 8 Number of B2 Number of Z 0 Display the average length of the strings in the list. Remember to use the results from 3 and divide by n 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
