Possible bug in '8. Word Up' in the Pyglatin section


The instructions state:

Inside your if statement:
Create a new variable called word that holds the .lower()-case conversion of original.
Create a new variable called first that holds word[0], the first letter of word.

In doing this, I came up with:

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():

word = original.lower()
first = original[0]
print word


print 'empty'

However, it seems the module checks the state of the variable %original rather than the variable it asked us to create, word. To fix this, I simply stored the original.lower() into %original rather than into %word, and printed %original rather than %word.

Should the module not ask us to store this into original rather than creating a new variable? Or you could check the state of word rather than original. Or am I a complete moron here?




It looks at both, word should be the same as original but converted to lower case, and first should be the first letter, also lower case (yours can be upper case)

Not sure what you're saying would be wrong about the exercise, but whatever is going in it's probably a good idea to figure out what it is. My guess is that you've got a different idea of what's supposed to happen and/or deviated from the instructions a bit and perhaps you're getting an error message that isn't making 100% sense


Wouldn't be the first time, I accidentally built the pyglatin translator outside of the class before I realized I would be building it during the class. Oops. I already know some Python, but i'm reluctant to skip ahead for fear I'd miss something.

After looking at it again, I realized on line 8 I had "first = original[0]" when the instructions said to assign first = word[0]. And the error message clearly indicated what the error was, but I glossed over it thinking I was smarter than the interpreter.

In short, I'm a moron. Thanks for calling me out!