Question: python homework need answer for all of this asap 1. Write a function find Word). It takes two parameters. A string which represents a paragraph




1. Write a function find Word). It takes two parameters. A string which represents a paragraph and string that represents a word to find in the paragraph. Note, let's say you have a word "anything" and you search for "any", it should not count anything. In other words, it has to be the exact word not a part of a word. Case must be ignored. >>> findWord ('Is this here', 'here') True >>> findWord ('Nothing is hidden',' 'nothing') True >>> findWord ('Did you find the word', 'word') True >>> findWord ('I cant hear what you are hearing', 'HEAR') True >>> findWord ('What are you hearing', 'hear') False >>> findWord ('I LIKE THIS PROBLEM', 'like') True 2. Implement a function vowelFinder that takes in a paragraph. The function prints all 2. Implement a function vowelFinder that takes in a paragraph. The function prints all the words that have vowel in it. Case is ignored. Pay attention to the first line of the output >>> vowelFinder('do i have a vowel') Processing do i have a vowel : do i have a vowel >>> vowelFinder ('x y z') Processing x y z: >>> vowelFinder ('grrrr is not a word') Processing grrrr is not a word: is not a word >>> vowelFinder() Processing : >>> vowelFinder ("This was fun') Processing This was fun : This was fun 3. Implement a function lengths() that takes in a string representing a paragraph. The function return a list of the lengths of each individual word in the text. >>> lengths ('wonder if this works') [6, 2, 4, 5] >>> lengths ('i love programming') [1, 4, 11] >>> lengths ('the last one was blank') [3, 4, 3, 3, 5] >>> lengths ('') [] 4. Implement the function formatter() that takes in a string of words in a paragraph. The function prints each word in a column with 13 spaces, and the next column prints the same word with the first letter capitalized. Pay attention to output format and the first line. be >>> formatter ( 'Watch what happens') Formats: Watch Watch what What happens Happens >>> formatter ('every word will be processed') Formats: every Every word Word will Will Be processed Processed >>> formatter('') Formats: >>> formatter('problems are starting to get more interesting') Formats: problems Problems Are starting st ng to get Get more More interesting Interesting are a 5. Implement a function changer that takes in a list of numbers and modifies based on an operation. The two types of operations supported are "add" and "subtract". All other operations are ignored. The first parameter is a list of numbers, the second the operation and the third how much to add or subtract each number. Example below. >>> changer ([10,20,30,40,50], 'subtract',1) [9, 19, 29, 39, 49] >>> changer ([10, 20, 30, 40,50], 'add',100) [110, 120, 130, 140, 150] >>> changer ([10,20,30,40,50], 'multiply', 100) []
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
