Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDominique Gaines
505 Pointsconcatenation. What am I doing wrong?
N/a
name = 'dom'
subject = 'Treehouse loves'
print subject + name
2 Answers
Stephen Gheysens
11,935 PointsHi Dominique, my guess is that the solution is looking for "Treehouse loves dom", but without a trailing space in your second variable assignment, the output would just be "Treehouse lovesdom". Let me know if this helps!
Alexander Davison
65,469 PointsActually, Treehouse is asking to format the name
variable into subject and not to print it
To format a string, you can do this:
'Hello there {}'.format(name)
(This is just an example, the real solution you must find for yourself) :)
If this hint doesn't help much, please ask below for more hints and I'd be happy to help
~Alex
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsWell, sort of. First off, you shouldn't be printing anything.
Second, you should be concatenating string, but formatting strings