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 trial

Python Python Basics (2015) Python Data Types String concatenation

Ali Faritous
Ali Faritous
267 Points

Task 2 of 2, String concatenates.

Can someone please let me know what I missing?

strings.py
name = "ali"
subject = "Treehouse loves "
subject + name

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Ali,

You are very close, but instructions need to be followed exactly in challenges or you usually end up with a Bummer even if the code is syntactically correct.

Here, the instructions state: "a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variable." But you have a third line there that was not asked for, which is concatenating 2 variables instead of a string and a variable.

The instructions want you to concatenate right onto the string. So, you have all the right code and syntax, you just need to shift and delete a couple of things. HINT: The completed code after task 2 will only be 2 lines.

I'm sure you can get it now. :)

Keep Coding! :dizzy:

Ali Faritous
Ali Faritous
267 Points

Finally figured it out. Thank you!