Printing Variables


#1



https://www.codecademy.com/courses/python-beginner-sRXwR/2/2?curriculum_id=4f89dab3d788890003000096#

I have a right code as advised but still throwing an error

Print "Ping!"

"""Assign the string "Ping!" to
the variable the_machine_goes on
line 5, then print it out on line 6!"""

the_machine_goes = "Ping!"
Print = "the_machine_goes"


#2

When you want to print a variable you do not place it in quotations. Putting it in quotations changes it in to string on its own.


#3

You don't use quotations when printing a variable


#4

Consider this and apply your understanding to help clear your exercise.

greeting = “Hello, World!”
print greeting

#5

hi i am getting the console output also i have set the variable the_machine_goes ="ping!" still been asked, whether i had set it to ping or not i don,t know what am i doing wrong anyone can help me please!


#7

Maybe it's because you did not lowercase the word print (you wrote Print instead of print)


#8

when printing, don't use quotes for the string you want to print. Instead, leave the quotes and just add a space between print and your string... like this =>

the_machine_goes = "Ping!"
print Ping!

#9

thanks for taking ur time out and replying but its still not working i am stuck.


#10

thanks for ur reply nope i am using lower case p don,t know i am stuck cant move further


#11

If you have followed the tips here you should be passing the section. Copy and paste this exactly how it is:

the_machine_goes = "Ping!"
print the_machine_goes

#12

thank you soo much it worked


#13

thank u very much


#14

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