Word Up


Stuck on "Word Up"

I am not sure how this code is incorrect, I keep getting the error “Oops, try again. It looks like word is set to “original.lower()” instead of “w”.”

pyg = "ay"

original = raw_input("Enter a word:")

if len(original) > 0 and original.isalpha():
    word = "original.lower()"
    first = "word[0]"
    print "word"
    print "try again, you dumb"


No quotes.


Not asked for.

This, neither.


Why are no quotes required?


Because a variable is an identifier. It cannot have quotes or the interpreter will not discover it as such.


So, we only use quotes when we are telling what we want the variable to contain? Thanks, by the way


Only use quotes when you want the variable to be TYPE str.


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