Skip to content

Instantly share code, notes, and snippets.

@riyaj8888
Created June 15, 2017 13:15
Show Gist options
  • Save riyaj8888/459a03c19225da84494b226ebb92bfbe to your computer and use it in GitHub Desktop.
Save riyaj8888/459a03c19225da84494b226ebb92bfbe to your computer and use it in GitHub Desktop.
#input is string of word
word=input('enter word = ')
l=['a','e', 'i', 'o' ,'u']
i=0
while i< len(word):
if word[i] in l:
#print(i)
pig_latin_word=word[i:]+word[:i]+'ay'
print(pig_latin_word)
break
elif word[0] in l:
print('word begins with vovewls')
y=word+'yay'
print(y)
i=i+1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment