Bug - Word up "input starts with [letter] that is not w" or something


Found the bug explained in this thread: https://discuss.codecademy.com/t/word-up-oops-try-again-did-you-create-a-variable-called-word/74425

you have to use a input that starts with the letter "w". If you have typed in another word run the code again with no input to clear it out and type in "word"

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    print original
    word = original.lower()
    print word
    first = 'word'[0]
    print first
    print 'empty'


yea, here:

first = 'word'[0]

you have 'word', which is a string. This is why your input word has to start with w, otherwise the translation is not correct

you could also just use word variable, then you can input any word you like


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.