Skip to content

Instantly share code, notes, and snippets.

@ThisIsTraian
Created September 29, 2015 06:34
Show Gist options
  • Save ThisIsTraian/2d54abebe59047b6f4bf to your computer and use it in GitHub Desktop.
Save ThisIsTraian/2d54abebe59047b6f4bf to your computer and use it in GitHub Desktop.
Solution to Codecademy (http://www.codecademy.com) Python Pig Latin Assignment.
pyg = "ay"
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
new_word = word[1:len(word)] + 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