Word up


How do I do this

Replace this line with your code.


you forget to put colon : after if statement : at line 5
and remove the colon at line 7


I tried that but there was still an error


It doesn't look like you made a variable named "word". The Way to make a variable is you pick a random word int his case "word" and you set it = equal to something.


You did it for "original"


I don't quite understand, how do I put it as a variable


Maybe a line before or after you could type word = whatever. Or maybe I'm wrong and it is possible to set a variable to something within an if statement, but I don't think so. Like what you did on line 6, you wrote if word = original.lower(). The word = original.lower is what you would do to set word to that value. except you do it in an if statement which I don't think can work, if it's no bother please let me know of the result.


I tried but it didn't work, thanks anyways though


When yu tried that did you keep your "if"?


Also some languages use 2 equal signs to check if a value or word equals something or not.


can someone please send me a photo of the done version of this lesson ( word up) i cant seem to figure it out


I can try to help, but will not post pictures unless totaly sure Codecademy is not working. What lesson is part of?


Maybe you should try to add the colon and declare the word variable what ever else you need to do.


I reset my code, but when I try to re paste the code and run it without entering anything is tells me word is set to the value I entered when I ran it last time.


I still can't seem to figure it out, this is my rested code


Can someone please send me the done version of this, I have tested all the suggestions and it is still not working.


this is passing for me.

original = raw_input('Enter a word:')

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


Have you tried indenting 4 spaces on line 6 and 7?


I had the same, but if the word I entered had any capitals, they would remain in what was printed. When I changed "print original" to "print word" I got the result all in lower case letters. :slight_smile:


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