Word up


#1




How do I do this


Replace this line with your code.


#2

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


#3

I tried that but there was still an error


#4

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.


#5

You did it for "original"


#6

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


#7

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.


#8

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


#9

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


#10

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


#11

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


#12

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


#13

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


#14

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.


#15

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


#16

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


#17

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
else:
    print 'empty'

#18

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


#19

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:


#20

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