Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON 3.6 Problem 12 Part A (12 points) Write a function named containsLetter) that identifies all of the strings in a list that contain a

PYTHON 3.6

image text in transcribed

Problem 12 Part A (12 points) Write a function named containsLetter) that identifies all of the strings in a list that contain a specified letter and returns a list of those strings The function containsLetter() takes two parameters: 1. a string of length 1, aLetter 2. a list of strings, strList For example, the following would be correct output: >>> hulkLine = ["you", "wouldn't", "like", "me", "when", "i"m", "angry"] >>> searchLetter li! >>>print (containsLetter(searchLetter, hulkLine)) Problem 12 Part B (8 points) Write code that calls containsLetter) for each letter in 'hulk'. Each function call should pass one of the letters in 'hulk' and the string hulkLine as parameters. After each function call your code should print the list of words returned by containsLetter(). For full credit, you must put the call to containsLetter() inside of a for loop The following would be correct output. ["you", "would ["wouldn't" "like" 1 ["like"1 n't"]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

7 Understand and analyze classified financial statements.

Answered: 1 week ago