python-by-example-150-chall.../challenges20-26/challenge-026.py
2019-07-17 09:56:46 +03:00

10 lines
265 B
Python

word = str(input('Please enter a word : '))
first = word[0]
length = len(word)
rest = word[1:length]
if first != 'a' and first != 'e' and first != 'i' and first != 'o' and first != 'u':
newword = rest + first + 'ay'
else:
newword = word+'ay'
print(newword)