Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

vowels to the same vowel is a first step. word should be a string---otherwise re

ID: 3904665 • Letter: V

Question

vowels to the same vowel is a first step. word should be a string---otherwise return boolean value False when word is a string, return word with all vowels changed to the letter examples: 10 12 13 11vowe1sA( "by") produces "ba" allvowelsA("alien") produces allvowelsA("boot") produces "baat" allVowelsA("fruition") produces "fraataan "alaan" 15 16 17 18 19 20 21 Note: empty string is legal, and should return empty string # (a) make sure word is of the correct type if (type(word) !-str): 23 result-" vowels-"aeiouyAEIOUY" 7for i in range(len(word)): # (b,c) Use accumulator pattern on result, replacing letter with a if its a vowel (two blanks below) if word[il in vowels: else: return result

Explanation / Answer

First blank: return False;

Second blank: result+"a"

Thirdblank: result + word[i]

Note here + operator concatenates the result with the alphabet and stores the same.