I just started coding at code academy and it’s a blast. I’m having fun and learning with the PygLatin translator. But as of right now, there is something I don’t seem to understand with this particular piece of coding I have presented here.
At the first conditional statement, the ‘if’, there seems to be a problem. Without a boolean, the code seems to work fine, but when the boolean ‘or’ is introduced, the code always seems to put out the message ‘dude, be polite’.
Maybe it’s something really easy I just looked over, but it would be great if I understand the mistake.
Any help is appericiated!
yay = 'ay' original = raw_input('Hey there, please type in a word and press enter: ') if original == 'boring' or 'no': print 'dude, be polite' elif len(original) > 0 and original.isalpha(): word = original.lower() first = word new_word = word + first + yay new_word = new_word[1:len(new_word)] print new_word else: print 'please try again'