Question: Create the following list: word_list = [bit, register, algorithm, loop, transistor] 1) Create a list called word_sizes and populate it with the number of letters
Create the following list:
word_list = [bit, register, algorithm, loop, transistor]
1) Create a list called word_sizes and populate it with the number of letters in each word in word_list.
2) Ask the user to input a letter. Create a list called letter_count that is equal to the number of times the users letter is found within each word in word_list. For example, if the user inputs the letter i then letter_count would be [1, 1, 1, 0, 1].
3) Create a list named data whose elements are the sum of the respective elements of word_sizes and letter_count.
4) Remove from the word_list any word with an odd number of letters.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
