Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do no change the code provided, I get marked off for that. Instructions 0. Remember to comment. If your code fails to perform the

Please do no change the code provided, I get marked off for that.

image text in transcribedimage text in transcribed

Instructions 0. Remember to comment. If your code fails to perform the task at hand but your comments are describing proper code execution I can award a substanial amount of points for logical errors in your program. Think of comments as the equivalent of showing your work in a math class. 1. Read all instructions carefully, ask questions if anything is confusing. 2. Fill in the code/text blocks to answer each question. 3. Do not change any of the existing code provided. The code is specifically there to help you! 4. Run the entire notebook before submitting it on Sakai to make sure that the code actually runs without errors 5. Important: Any question for which your code fails to run will receive 0 points. 6. Have fun! 7. DO NOT USE ANY PACKAGES, other than the ones I have imported. Part of learning is to struggle through the "hard way" before getting to do things the easy way. Any packagesI have importe aefair game and you may use any functions unless otherwise specified. If I've imported them after a function, I've deliberately made it so you cannot retroactively use them in an earlier problem. 8. If I've used return(None) for a function, you may definitely change the return type. It's just a placeholder 9. While you may discuss the concepts of the problems with your peers your code will need to be yours and yours alone 10. Replace CS497 with your BUID (ie if I was turning in this assignment my file would be called dbrennan_lab4) Problem 2 (35 points) Write a function vowel_reverser that takes a word (a string) and reverses the vowels. "Hello" becomes "Holle" "butterscotch" becomes "botterscutch". The e didn't switch places with anything If the word contains anything other than letters [A. Za. z] return the empty string. Punctuation, special symbols, hypthens, spaces etc should return the empty string. In [15]: from string import ascii_letters #asciLletters is uppercase + Lowercase combined from string import ascii_letters In [14]: def vowel_reverser(word): output-" return(output) in [ ]: H

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions