11 printing variables


#1



11 Printing Variables


Can anybody help please? I am receiving the error

"File "python", line 6
Print "the_machine_goes"
^
SyntaxError: invalid syntax"

I am unable to workout why? Is anybody able to help me out? I am sure its a sillly error on my part.


"""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

Hi the_machine_goes is The variable so You should remove The " " around It.
Because with It ..It become a string


#3

Thank you for the quick reply. I knew it would be me missing somthing simple.

Thanks again.


#4

I can not did it but it was not given it here
File "python", line 2 print the_machine_goes ^
IndentationError: unexpected indent


#5

Thanks, it is always the small things!


#6

Oops, try again. Did you set the_machine_goes equal to the string "Ping!"?
Altough the out put is not giving any errors but its showing this why??


#7

Same problem here

"""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

Can't figure out whats wrong.


#8

yes I am also cheking for that


#9

Im still confused can't get passed:/


#10

I'm having same problem, what did u do>?


#11

it is
the_machine_goes = "Ping!"
print = the_machine_goes

no quotes around second answer


#12

it can't be like print = the_machine_goes . cause print doesnt work like that.


#13

Just remowe equal sign between print and the_machine_goes : it will be like print the_machine_goes :slight_smile:


#14

i cant get past this stage ;"ping!"none.........but on the bottom part......oops,try again,did you set the_ machine_goes equals to the string "ping!".what could be the problem plz help am stuck......!!


#15

HI can you post your code?


#16

I got it by doing this:
the_machine_goes = "Ping!"
print the_machine_goes

It might have been that you didn't capitalize "Ping!", that's what happened to me


#17

Thanx sofiajm.......got it


#18

:smile_cat: Hi i'm only writing because i want a badge. Yay!


#19

I was also having a huge issue with this one. I did have some errors, but for whatever reason the system was not registering my updates. Be sure to reset the code completely, then try again, this seemed to work for me.


#20

I was having this problem because I kept capitalizing print.