Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
problem
#python 3.6.9 S = str(input()) splitedArr = S.split(" ") vowelsIndexMap = { 'a': 1, 'e': 2, 'i': 3, 'o': 4, 'u': 5, }; vowelsArr = ['a', 'e','i','o', 'u'] outputList = [] for word in splitedArr: charList = list(word) for idx, c in enumerate(charList): if c.isupper(): charList[idx] = c.lower() for idx, c in enumerate(charList): if idx % 2 != 0: if charList[idx] in vowelsArr: charList[idx] = vowelsArr[idx - 1 % 5] else: if charList[idx] in vowelsArr: charList[idx] = str(vowelsIndexMap[charList[idx]]) outputList.append(''.join(charList)) print(','.join(outputList))
run
|
edit
|
history
|
help
0
Lab_I_4_25_11_2020
prime_nonprime_count.py
shuru
Like.C.M.
shuru2
Inheritance.py
события
handwash
delta5
Primes finding algorithm