Question: In python please Questions 6 through 10 involve manipulating text from the following horror book: My Book, by mike Chapter 1: set up The little
In python please








Questions 6 through 10 involve manipulating text from the following horror book: My Book, by mike Chapter 1: set up The little boy in bed was scared. Chapter 2: suspense "Daddy, daddy there's a monster under my bed." Chapter 3: climax The father then looked under the bed .. and saw his son. Chapter 4: resolution "Daddy, daddy, someone's in my bed!" (the end) About the author: a first time novelist Book notes and hints: the contents of the book is everything from 'Chapter 1' until but not including '(the end)'. . if you find yourself counting the characters, you need to rethink your solution. Use Python to get the indices, not your fingers (see documentation on find) you should NOT need to add text to any of these. If you find yourself wanting to add periods, newlines, etc, you are on the wrong path. remove means return the book but without the part requested to be removed. extract means return the part of the book that is to be 'extracted' (i.e. removed) Question 6: Remove: remove the front matter of the book From: the text of the book the front matter is the stuff before the contents contents = "Chapter 1: set up " "The little boy in bed was scared. " "Chapter 2: suspense " "\"Daddy, daddy there's a monster under my bed. \" " "Chapter 3: climax " "The father then looked under the bed .. and saw his son. " "Chapter 4: resolution " "\"Daddy, daddy, someone's in my bed!\" ") 11 # use these variables for testing (optional) forward = "My Book, by mike " post "(the end) About the author: a first time novelist " book "{}{}{}".format(forward, contents, post) "{}{}".format(contents, post) noEnd "{}{}".format(forward, contents) 11 noFront = = Question 7: Remove: remove the back matter of the book From: the text of the book the back matter is the stuff after the contents Question 8: Extract: the front matter of the book From: the text of the book Question 9: Extract: the back matter of the book (About the author) From: the text of the book Note: do NOT include (the end) Question 10: Extract: the contents of the book From: the text of the book Extra Credit: (optional) The last 3 questions want you to extract a hidden message from a gibberish of text (see the next code cell). Question 11: Extract: I Love Python From: mystery11 variable Question 12: Extract: Data Science Rocks From: mystery12 variable Question 13: Extract: Info 490 is fun From: mystery13 variable [52] # find the mystery messages in each of these strings # using the same format as the first 10 questions mysteryll = "srbGIE JLWOKVOER DPhyItWhYolnz" mystery12 "AgDoSaMqtigaDF FmSAMcgZizuetSnckcYOeUM hzRvVoapceukbasUk" mystery13 "PDWQHwnHquOmfVA 1TsxJise YVOVE 9wH4Ct qkouPfQgnQLIRvj
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
