Can you help me figure this code.
Go ahead and print the_machine_goes in line 6.
print “the_machine_goes”
it is telling me to - Did you remember to print out “Ping!”?
print “the_machine_goes” “Ping!”?
after I tried this, my code is still off. What have I done wrong?
you print the string "the_machine_goes"
, you should print the variable the_machine_goes
, given the variable contains a value of ping!
, this will be printed to the console
ok like this
the_machine_goes ping!
ok, i tried it and it did not work. What did I do wrong?
I know it is something simple. What am I doing wrong?
Here is all of the instructions
Declare a variable called the_machine_goes and assign it the string value “Ping!” on line 5.
Go ahead and print the_machine_goes in line 6.
I have line 5 as correct, but not line 6, and it gives me this statement.
Did you remember to print out “Ping!”?
the correct code is even given in the instructions (print the_machine_goes
), this will print the value of the variable, doing print variable_name
will print the value of the variable
I still cannot get it right as this is what I typed in below for line 5 and 6
the_machine_goes = “Ping!”
print “the_machine_goes”
on the screen it does print out the machine goes, but the issue I am having is it tell me -
Did you remember to print out “Ping!”?
I don’t understand ping
I am new to coding and I don’t understand what I need to type to move on
ok, I got it. thanks for the help.
i gave you the correct code:
print the_machine_goes
and you can’t figure it out?
here:
print "the_machine_goes"
you clearly print a string (strings are enclosed in quotation marks ("
), not the variable
to print the variable, don’t include the quotation marks
we can print a string, which has the same name as a variable