Practice section in Python


Why does it say incorrect syntax value for my code?
# Assign your variables below, each on its own line! 
caesar = "Graham"
praline = "John"
viking = "Teresa"
# Put your variables above this line

print caesar="Graham"
print praline="John"
print viking="Teresa"


You only have that put:
print caesar
print caesar="Graham"
because the variables are for save values


You can't use equal to- sign in python output statements.
As you see, you defined the variables, so they have their values. In this case the values are these strings:

 caesar = "Graham"
 praline = "John"
 viking = "Teresa"

Now you just print them out.

 print caesar
 print praline
 print viking

And the output will be


Hope this helps. :slight_smile:


so I use no equal signs?


Yes, you don't need them at all when you print stuff out. :wink:


wow both of you thanks!!!


No problemo. Can you press 'solution' at the post that solves the problem?


Havent I already done it I?


Well I see. Thank you, hope you understood the idea! :wink:


I did thank you :grinning:


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