1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vanyuwa [196]
3 years ago
8

Problem 1a. 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.
Computers and Technology
1 answer:
mash [69]3 years ago
8 0

Answer:

The answer is the programming in Python language has strings and characters that has to be declared in the method.

Explanation:

#method

def hasFinalLetter(strList,letters):

output = #output list

#for every string in the strList

for string in strList:

#findout the length of each string in strList

length = len(string)

#endLetter is last letter in each string

endLetter = string[length-1]

#for each letter in the letters list

for letter in letters:

#compare with endLetter

#if we found any such string

#add it to output list

if(letter == endLetter):

output.append(string)

#return the output list

return output

#TestCase 1 that will lead to return empty list

strList1 = ["user","expert","login","compile","Execute","stock"]

letters1 = ["a","b","y"]

print hasFinalLetter(strList1,letters1)

#TestCse2

strList2 = ["user","expert","login","compile","Execute","stock"]

letters2 = ["g","t","y"]

print hasFinalLetter(strList2,letters2)

#TestCase3

strList3 = ["user","expert","login","compile","Execute","stock"]

letters3 = ["k","e","n","t"]

print hasFinalLetter(strList3,letters3)

You might be interested in
Iman has 48 months to save $18,000, the maximum amount he estimates his first year of college will cost. He does not want to dep
natita [175]
The minimum amount that Iman should save is $375 
8 0
3 years ago
Read 2 more answers
Which of the following is a possible disadvantage of recursion? Question 10 options: Recursive solutions can be less efficient t
zavuch27 [327]

Answer:

Recursive solutions can be less efficient than their iterative counterparts

Explanation:

Recursion can be defined or described as a method of solving a problem where the solution depends on solutions to smaller instances of the same problem.

It entails using iteration to ensure that smaller parts of a solution are satisfied towards solving thw overall problem.

Ita major disadvantage seems to be that it seem to be less efficient than their iterative counterparts. This is as a result of concentrating on trying to solve a smaller instances.

4 0
2 years ago
MATH PLZ HELP ITS DUE IN 4 MINUTES​
zheka24 [161]

Answer:

2

Explanation:

8 0
3 years ago
Read 2 more answers
You are the network administrator for a small organization of 100 users. Users till now were freely browsing the Internet. You w
Schach [20]

Answer: Proxy server

Explanation: Proxy server is a type of server that is acts as interface between the network on huge scale and any local network. This server provides the feature of security, operations, privacy etc in the network system. They also help in improving the performance of the network.

It can work as the web filter to eliminate the unwanted websites.They acts as the gateway by  observing the website that is being browsed by the other user.Thus installation of proxy server should implemented on the organization.

8 0
3 years ago
What does clicking and dragging the fill handle in excel
Olegator [25]

Answer:

The fill handle copies the same values, formulas, or fills a series of dates, texts, numbers, and other data to a desired number of cells. ... Click and hold the handle, then you can drag up, down, across over other cells. When you release your mouse button, it auto-fills the content to the cells you dragged over.

5 0
2 years ago
Other questions:
  • The set of folders and subfolders that MATLAB searches through to locate a command or M-file is called the ___________.(fill in
    9·1 answer
  • 2 (01.01 LC)
    5·1 answer
  • What are the cues that a website is safe to use for exchanging sensitive information?
    10·1 answer
  • Which best describes obliteration in a forged document?
    11·1 answer
  • The ________ view in access looks similar to an excel spreadsheet.
    5·1 answer
  • Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the ou
    10·1 answer
  • Why are mobile phone called cell phones?​
    13·1 answer
  • Write a program that repeatedly reads in integers until a negative integer is read. The program keeps track of the largest integ
    9·1 answer
  • Explain information technology ?
    10·1 answer
  • mary needs to rename her report.txt file to final_report.txt. which command will allow her to do this?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!