Question: 2. Implement the function nWords With Letter() that takes in a number and a character as parameters. The function will repeat asking the user
2. Implement the function nWords With Letter() that takes in a number and a character as parameters. The function will repeat asking the user to enter n count of words and collect all the words the user enters. The function will return a list of all the words a user enters that have the character specified by the second parameter in them. The information below shows how you would call the function nWords With Letter () and what it would display for a few different inputs: nWordsWithLetter (5, 'a') Collecting words with the letter a Please enter a word: tom Please enter a word: anthony Please enter a word: jan Please enter a word: mohammed Please enter a word: gwen ['anthony', 'jan', 'mohammed'] nWordsWithLetter(2, 'z') Collecting words with the letter z Please enter a word: test Please enter a word: ate [] nWordsWithLetter (3, 'z') Collecting words with the letter z Please enter a word: zoom Please enter a word: zebra Please enter a word: zoom ['zoom', 'zebra', 'zoom']
Step by Step Solution
3.39 Rating (161 Votes )
There are 3 Steps involved in it
The function you are being asked to implement is called nWordsWithLetter This function should take t... View full answer
Get step-by-step solutions from verified subject matter experts
