Question: Complete the capitalize_words() function that takes two parameters: The parameter word_list is a list of strings. The parameter target_letter is a string consisting of a

 Complete the capitalize_words() function that takes two parameters: The parameter word_list

is a list of strings. The parameter target_letter is a string consisting

Complete the capitalize_words() function that takes two parameters: The parameter word_list is a list of strings. The parameter target_letter is a string consisting of a single alphabetical character. The function will capitalize the first letter of each word in word_list that begins with the target_letter Note that the function modifies the parameter word_list. It does not create or return a new list. Some examples of the function being used are shown below. For example: Test Result word_list = ["grumpy", "doc", "bashful", "happy", "sleepy", "sneezy", "dopey"] Before: ['grumpy', 'd print("Before:", word_list) After: ['grumpy, do capitalize_words (word_list, "s") print("After:", word_list) word_list ["hello", "world"] print("Before", word_list) capitalize_words (word_list, "e") print("After:", word_list) Before: ['hello', 'wo After: ['hello', 'wor eing used are shown below. Result '] Before: ['grumpy', 'doc', 'bashful', 'happy', 'sleepy', 'sneezy', 'dopey'] After: ['grumpy', 'doc', 'bashful', 'happy', 'Sleepy', 'Sneezy', 'dopey'] Before: ['hello', 'world'] After: ['hello', 'world'] ime: 5 10 15 20 25 30 35 40 45 50 )

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!