I just started to use codeacademy and to take the python course. At part 2.15, the command ‘raw_input’ is needed for the first time. The correct code for this step should be:
name = raw_input("What is your name?") quest = raw_input("What is your quest?") color = raw_input("What is your favorite color?") print "Ah, so your name is %s, your quest is %s " \ "and your favorite color is %s." % (name, quest, color)
When I execute the code, I get the following error:
What is your name?What is your quest?What is your favorite color?Ah, so your name is SCT, your quest is if type(error) == ValueError: and your favorite color is return "Make sure to use a lowercase \"s\" with \%s. Python told us about the following error: " + str(error).
I don’t even get a chance to enter anything. I tried this with FF and IE on 2 different computers. I also tried
name = raw_input('Enter something: ') print (name)
which cause the following output
Enter something: SCT
The cursor is located in the next line without being able to enter anything. I read that raw_input is simply input in python 3. So I tried
name = input('Enter something: ') print (name)
Enter something: Traceback (most recent call last): File "python", line 1, in <module> File "<string>", line 1, in <module> NameError: name 'SCT' is not defined
Is this a bug or am I doing something wrong?
Thanks a lot in advance!