Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lipogram List Comprehension Function Use Python's list comprehension to make a list of all the words in a string that have more than three letters

image text in transcribed

Lipogram List Comprehension Function Use Python's list comprehension to make a list of all the words in a string that have more than three letters and either begin with a vowel or contain any of the letters from a second string provided. Name the function "word_smith". This function will receive two strings as input and must return the count of words in the list as an integer value. The first string will be used to build your list. The second string will be the one to check for characters. Example: Input strings: "Programming languages is definitely the best course I have taken in my entire undergraduate CS career!" "Don't OVERTHINK it!" List: [Programming, languages, definitely, best, course, taken, entire, undergraduate] Return: 8 Notes on vowel: Normal vowels including y. .The case does not matter, Aa Notes on the input strings: Case matters, E-/e. .Spaces are not words so you can ignore them as characters You should ignore any character that is not part of the English alphabet ([a-z,A-Z]) in the second string. Which means, from the example, that if the first input string contains the word "whomst?!", it would be included in the count because of the 'o' and 't', however, "play!" would not be included. Non-alphabet characters do not count towards the character count. Ee! is two characters

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

Step: 3

blur-text-image

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

The Nature of Nonverbal Communication

Answered: 1 week ago

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

Nonverbal Communication Codes

Answered: 1 week ago