Question: 4. Implement the function matches () that takes in two numbers as a parameter. The function will ask the user to enter n words

4. Implement the function matches () that takes in two numbers asa parameter. The function will ask the user to enter n words

4. Implement the function matches () that takes in two numbers as a parameter. The function will ask the user to enter n words of 1 length. The function will collect all the worders than are greater than 1 length and return a list of them. The function will tell the user if the word was accepted or not as the user enters them. See screenshot below for details. >>|words=matches (5,5) Please enter a word: zero The length of zero is 4 we will not accept it. Please enter a word: catcher The length of catcher is 7 we will accept it. Please enter a word: trial The length of trial is 5 we will not accept it. Please enter a word: seperate The length of seperate is 8 we will accept it. Please enter a word: interesting The length of interesting is 11 we will accept it. >>> words ['catcher', 'seperate', ' 'interesting'] >>> words=matches (2,1) Please enter a word: cat The length of cat is 3 we will accept it. Please enter a word: dog The length of dog is 3 we will accept it. >>> words ['cat', 'dog'] >>> words=matches (2,10) Please enter a word: a The length of a is 1 we will not accept it. Please enter a word: b The length of b is 1 we will not accept it. >>> words [ ]

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 Algorithms Questions!