https://www.codecademy.com/courses/learn-python/lessons/pyglatin/exercises/testing-testing-is-this-thing-on-
that’s the link to my project, I’m very confused
You use raw_input()
in this exercise: When prompted, enter the word in the console by typing the word, and pressing enter. That should be all that’s required.
Where in the console? I’ve tried typing it just like that, with quotes, after original, after raw_input, its just not showing anything. Every time I hit run, all that shows up on the other side is “Enter a word:” with the space blinking thing.
The “space blinking thing” is the console waiting for input. Type your word there and press enter.
I forgot to mention, whenever I do anything, it just shows that loading circle when I press “run”. I have tried everything, nothing shows up on the other side.
I do, but then the word shows up like normal on the other side.
I have clicked view solution for everything, because the system refuses to let me move forward, so I know the code is right.
You are not entering a word, so the program never terminates (it is waiting for your action, which it never receives). Remove cupcakes from your raw_input()
call; it needs to be passed in the console, not in the code itself:
original = raw_input('Enter a word: ')
Now, when you run your code, it will prompt you to enter a word in the console, saying:
Enter a word:
Type your word (cupcakes) into the console at this stage, and press the enter/return key. This will cause your program to store the value “cupcake” in original
and will continue to run using that value.
so after i do that, I click run? because if i do that, the word immediately disappears and i get the loading circle
Edit your code to remove cupcakes
, run your code, and when prompted (the blinking white box), type the word into the console and press enter.
This is how you will always access user input in this Python 2 course.
I got rid of the cupcakes in the actual code, it’s still not working.
Please post any errors you get after you run the code, as well as your code (a screenshot works fine).
Your code is now running correctly. However, you never output the value of new_word
to the console, so the modifications you have made are not clearly displayed. Add a print
statement in the if
branch to display new_word
's value:
print new_word
Thank you! The instructions said to remove any print statements so I did. Thanks for your help!
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.