I need help on printing variables


#1

this is what it says to do
01. Declare a variable called the_machine_goes and assign it the string value "Ping!" on line 5.
02. Go ahead and print the_machine_goes in line 6.

I done that
the_machine_goes = "Ping!"
print = the_machine_goes

but it says = is invalid syntax

it would be helpful if someons solved this fro me :slight_smile:


#2

keywords (print) aren't valid variable names so you can't assign them to values, and printing isn't done by assignment


#3

A post was split to a new topic: Printing variables


#5

A post was merged into an existing topic: Printing variables


#6

the_machine_goes = "Ping!"
print the_machine_goes

no quotes simply that
try that way instead
good luck


#7

thank you that was very helpful


#8

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