Created
July 2, 2013 01:07
-
-
Save damianesteban/5906045 to your computer and use it in GitHub Desktop.
Python "PygLatin" Translator.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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