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
Matt goes to an Internet café and tries to access his emails. The email client asks Matt to enter his email address along with t
Radda [10]

Answer:

acknowledging

Explanation:

it has to be d

6 0
3 years ago
What is the bleed space in a design?
pav-90 [236]

Answer:

The bleed is the part on the side of a document that gives the printer a small amount of space to account for movement of the paper, and design inconsistencies. Artwork and background colors often extend into the bleed area. After trimming, the bleed ensures that no unprinted edges occur in the final trimmed document.

Explanation:

8 0
2 years ago
Mark, a programmer, is testing his program in order to locate syntax errors. Which skill will help Mark most in detecting and re
Artist 52 [7]

Answer:

logic development

Explanation:

7 0
3 years ago
Application program?​
Butoxors [25]

Answer:

Explanation:

An application, also referred to as an application program or application software, is a computer software package that performs a specific function directly for an end user or, in some cases, for another application. An application can be self-contained or a group of programs.

6 0
3 years ago
A Vigenère cipher uses a sequence of "shift-by-n" simple substitutions, where the shifts are indexed using a keyword, with "A" r
Damm [24]

Answer:

ye bro

Explanation:

4 0
2 years ago
Other questions:
  • You are looking for a backup that copies only the files that have changes since the last full backup. Which of the following wil
    13·1 answer
  • A ________ is a collection of forms, reports, queries, and programs that serves as an intermediary between users and database da
    6·1 answer
  • Which of the following tasks are suitable for creating an algorithm? Choose all that apply.
    14·1 answer
  • Read the scenario below and then answer the
    14·1 answer
  • Anyone got the edmentum computer programming post test answers?
    6·1 answer
  • What is a unit to measure loudness
    15·1 answer
  • Imagine that a crime has been committed and being a police officer you have to investigate the case. Solving a crime can be a ve
    12·1 answer
  • Assume you are given a boolean variable named isNegative and a 2-dimensional array of ints that has been created and assigned to
    8·1 answer
  • Set of general format used to write program in any programming language?​
    10·1 answer
  • In what ways can information be slanted in a news report?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!