12. String Concatenation


#1

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"


#2

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

Correct:

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

To:

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

#3

ah excellent! Thank you!


#4

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?


#5

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:


#6

do we need to add space after "spam"