Skip to content

Instantly share code, notes, and snippets.

@scarsonmit
Created September 22, 2012 01:54
Show Gist options
  • Save scarsonmit/3764842 to your computer and use it in GitHub Desktop.
Save scarsonmit/3764842 to your computer and use it in GitHub Desktop.
Codecademy PygLatin Project
pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
if first == "a" or first == "e" or first == "i" or first == "o" or first == "u":
new_word = word + pyg
print "vowel"
print new_word
else:
word = word[1:]
new_word = word + first + pyg
print "consonant"
print new_word
else:
print 'empty'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment