Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
new_word = word[1:] + word[0] + pyg
print new_word
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