Having problems with Strings & Console Output



Oops, tente outra vez. Tenha certeza de exibir the_machine_goes, e nao a string literal "Ping!"
Oops, tente outra vez. voce se lembrou de exibir "Ping!"?

I tried EVERYTHING TO MAKE THIS HAPPEN!! When I use a code with " print "Ping!" ", I have a message that I have to make the "the_machine_does" to appear in the box. When I make it appears, it says that I have to make "Ping!" appears in the box. I'M CRASYYYYY. HELP ME!!

Replace this line with your code.


Hello @leoabreu98, could you include your code in a formatted way?
Like this:

 paste your code here


Of course. Like this?
"""Atribua a string "Ping!" a
variavel the_machine_goes na
linha 5, entao exiba a na linha 6!"""

the_machine_goes = "Ping!"
print "Ping!"


It's in Unit 2: lesson 11.


Almost, those are three backlits ( ` ).
But in this question you're asked to assing the string "Ping!" to a variable called the_machine_goes.
And then they want you to print the variable.


The string "PYTHON" has six characters,
numbered 0 to 5, as shown below:

| P | Y | T | H | O | N |
0 1 2 3 4 5

So if you wanted "Y", you could just type
"PYTHON"[1] (always start counting from 0!)
fifth_letter = "MONTHY"[5]

print fifth_letter


the_machine_goes= "Ping!"

print the_machine_goes

i had the same problem. try resetting your code and tried input my code in.goodluck


Yah... except, since Python begins counting at zero, MONTY[5} is actaully calling for the 6th letter of the word (which does not exist). Calling the 5th letter of the word would look like MONTY[4].


Thak al youm guys. I was in the classes of Python and just now I returned to Codecademy. I was puting ( ) and "" to make the print. Thank you so much.