Asked by Max
a. Write a function named hasFinalLetter that takes two parameters
1. strList, a list of non-empty strings
2. letters, a string of upper and/or lower case letters
The function hasFinalLetter should create and return a list of all the strings in strList that end
with a letter in letters.
b. Create three test cases, each consisting of a list of non-empty strings and a string of upper
and/or lower case letters, for your function in Problem 1a. One of these tests should return
the empty list. For each test case write two assignment statements and a function call that
pass the test arguments to your function.
Anyone know how to do this I keep getting invalid syntaxes?
1. strList, a list of non-empty strings
2. letters, a string of upper and/or lower case letters
The function hasFinalLetter should create and return a list of all the strings in strList that end
with a letter in letters.
b. Create three test cases, each consisting of a list of non-empty strings and a string of upper
and/or lower case letters, for your function in Problem 1a. One of these tests should return
the empty list. For each test case write two assignment statements and a function call that
pass the test arguments to your function.
Anyone know how to do this I keep getting invalid syntaxes?
Answers
There are no human answers yet.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.