python help... Write a function justVowels() that takes a string as a parameter and returns a new string that contains all the vowels found in the parameter string. The vowels in the returned string should appear in the same order as they did in the parameter string. A vowel is one of a, e, i, o, or u. both the upper- and lower-case vowels should be included. The characters in the returned string should have the same capitalization as they did in the parameter string. If the function is given a string without any vowels or an empty string, it should return the empty string. Use the if-else condition with iterate loop pattern. Don’t forget to include the docstring and comments. How it should run... >>> justVowels('Did you include your collaboration statement') 'iouiueouoaoaioaee' >>> justVowels('If you did not include your collaboration statement no points') 'Iouioiueouoaoaioaeeooi' >>> justVowels('1,2,3,4,...') '' >>> justVowels('')
python help...
Write a function justVowels() that takes a string as a parameter and returns a new string that contains all the vowels found in the parameter string. The vowels in the returned string should appear in the same order as they did in the parameter string. A vowel is one of a, e, i, o, or u. both the upper- and lower-case vowels should be included. The characters in the returned string should have the same capitalization as they did in the parameter string. If the function is given a string without any vowels or an empty string, it should return the empty string. Use the if-else condition with iterate loop pattern. Don’t forget to include the docstring and comments.
How it should run...
>>> justVowels('Did you include your collaboration statement')
'iouiueouoaoaioaee'
>>> justVowels('If you did not include your collaboration statement no points')
'Iouioiueouoaoaioaeeooi'
>>> justVowels('1,2,3,4,...')
''
>>> justVowels('')
''
The answer is given below with the code and output screenshots
Step by step
Solved in 4 steps with 2 images