Skip to content

Instantly share code, notes, and snippets.

@damianesteban
Created July 2, 2013 01:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save damianesteban/5906045 to your computer and use it in GitHub Desktop.
Python "PygLatin" Translator.
pyg = 'ay'
original = raw_input('Enter a word to be translated:')
word = original.lower()
first = word[0]
new_word = word + pyg
if len(original) > 0 and original.isalpha():
if first == 'a' or first == 'e' or first == 'i' or first == 'u':
print new_word
else:
new_word = word[1:] + word[0] + pyg
print new_word
else:
print "Invalid Entry. Must ONLY contain letters. Please Try Again."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment