Skip to content

Instantly share code, notes, and snippets.

@arslnb
Created November 14, 2012 11:44
Show Gist options
  • Save arslnb/4071682 to your computer and use it in GitHub Desktop.
Save arslnb/4071682 to your computer and use it in GitHub Desktop.
PygLatin Translator
pyg = 'ay'
original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
leng = len(word)
if len(word) > 0 and word.isalpha():
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
new_word = word + pyg
print new_word
else:
new_word = word[1:leng] + first + pyg
print new_word
else:
print 'empty'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment