-
-
Save codecademydev/809904d37cc0b63177c7336b3c19e5d9 to your computer and use it in GitHub Desktop.
Codecademy export
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
"""This program is designed to translate one word at a time into Pig Latin""" | |
pyg = 'ay' | |
original = raw_input('Enter a word:') | |
word = original.lower() | |
#When it mentions to include in "if" statement, it means after the colon but underneath the if statement. Just make sure it is indented with 4 spaces. | |
if len(original) > 0 and original.isalpha(): | |
first = word[0] | |
new_word = word + first + pyg | |
print new_word[1:len(new_word)] | |
else: | |
print 'Invalid Format' | |
#This has been tested and works as designed. Hope this helps. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment