Need help please


What am i doing wrong

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


re-usability of a variable.

suppose I have created a variable x..

x = 45

so now to print it ,I will use of variable as my variable stores/tags the value..

like this..

print x # it will print 45

print x + 5 #it will print 50

You see Im not using the value now?but variable (name of value) associated with this value?


will you explain it a bit easier im still kinda a noob at this


Hi @lootmonkey1337
suppose I have told to save my name in a variable name
I'd do this..

name = "GreenTree"

now if someone says to print it? I'd do this..

print name #using variable -more effective

You can directly print the name like this..

print "GreenTree" #using value

In the following exercise you've to use variable to print the value.

My variable name stores value of my name.
Note - I did not just used GreenTree but I surrounded them between quotes like this.. "GreenTree".

When we work with text in python,We don't just use it but we surround them using double or single quotes (You can even use triple quotes) like this..

name = "GreenTree" #doublequote
name = 'GreenTree' #singlequote
name = """GreenTree""" #triplequote
or even
name = '''GreenTree'''

for python all of them are same.
when python executes your program and sees quotes "It says ,Oh it's a starting of text and when it hits end quote of string it understands that text has just ended"
That's how python works with texts.

I hope it helps!
do reply ! :slight_smile:


thank you and it helped a lot :slight_smile:


you are the most helpful person i have meet on this


There're are many cool and helpful people on this forum! :slight_smile:
keep up the good work! :thumbsup:


if i need any more help i will be sure to ask and thank you again :slight_smile:


One final question you play xbox or pc?




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.

what is the end product suppose to look like


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