Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python thanks 1. a. Write a function named hasFinalLetter that takes two parameters 1. strList, a list of non-empty strings 2. letters, a string
in python thanks
1. 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. 2. a. Write a function named isDivisible that takes two parameters 1. maxlnt, an integer 2. twolnts, a tuple of two integers The function is Divisible should cre and list of all the ints in the range from 1 to maxlnt (not including maxlnt) that are divisible of both ints in twolnts. b. Create three test cases, each consisting of a value for maxlntand a value for twolnts, for your function in Problem 2a. 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 functionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started