I need python 3 help.
Thank you
This is question 2 function that i made
def change(english_word):
assert isinstance(english_word, str)
def letter_mover(letter):
“””if it takes vowel letter, it changes to next vowel. If ittakes
consonant, it changes to next third consonant.”””
vowels_double = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’, ‘a’, ‘e’, ‘i’, ‘o’,’u’]
consonant_double = [‘b’, ‘c’, ‘d’, ‘f’, ‘g’, ‘h’, ‘j’, ‘k’, ‘l’,’n’,
‘m’, ‘p’, ‘r’, ‘s’, ‘t’, ‘v’, ‘w’, ‘x’, ‘y’, ‘z’, ‘b’, ‘c’, ‘d’,’f’,
‘g’, ‘h’, ‘j’, ‘k’, ‘l’, ‘n’, ‘m’, ‘p’, ‘r’, ‘s’, ‘t’, ‘v’, ‘w’,’x’,
‘y’, ‘z’]
if letter in vowels_double:
return vowels_double[vowels_double.index(letter)+1]
if letter in consonant_double:
return consonant_double[consonant_double.index(letter)+3]
return letter
english_word = english_word.lower()
return “”.join(map(letter_mover, english_word))
Q5: Mapping a Great Text!
Upon finishing
PayPal Gateway not configured
PayPal Gateway not configured