12. String Concatenation


not sure whats wrong with this...

Print the concatenation of "Spam and eggs" on line 3!

print "Spam " + "and " + "eggs "

it prints out correctly and the error message shows that i printed out exactly what it was looking for. something like "you printed out "Spam and eggs" when you should have printed out "Spam and eggs"


You have a space behind the word "eggs".
There is the problem.


print "Spam " + "and " + "eggs "


print "Spam " + "and " + "eggs"


ah excellent! Thank you!


the error messge shows that I printed "Spam and eggs" when I shouls have printed out "Spams and eggs". where di I put a full stop?


Oh You were meant to write this: print "Spam " + "and " + "eggs" not "Spam " + "and " + "eggs ". The space before the s on eggs isn't meant to be there because it is ending the sentence :smile:


do we need to add space after "spam"