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 trialJovita Alphonse
313 Pointsconnecting strings
subject = "treehouse" + "loves"
name = 'jovita'
subject = "Treehouse" + "loves"
2 Answers
AJ Salmon
5,675 PointsHi Jovita!
This challenge wants you to concatenate the string 'Treehouse loves' with your name, using your name variable that you already set. SO, subject should be equal to "Treehouse loves jovita". Don't forget to add a space to the end of your "Treehouse loves" string, so that there's a space between the word 'loves' and 'jovita'.
Jovita Alphonse
313 Pointsthanks.
AJ Salmon
5,675 PointsMy pleasure! Happy coding :)
Jovita Alphonse
313 PointsJovita Alphonse
313 PointsCan i ask another question - I am getting hung up on task 2.
See Below
OK, now use .format() on the string "Treehouse loves {}" to put your name into the placeholder. Assign this to the variable subject (so start with subject =). You do not need to print() anything.
1 name = "jovita" 2 subject = "treehouse loves{}".format(name) 3
AJ Salmon
5,675 PointsAJ Salmon
5,675 PointsIn code challenges, the code engine looks for a very specific answer. You need to make sure that your code will output exactly what the challenge asks you to, otherwise it won't pass. So here, capitalize 'treehouse' and make sure there is a space between the word 'loves' and the curly braces. Example:
Hope this helps!