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

Why does it keep saying that my subject isn't ending with name?

My subject is ending with name

strings.py
name = ("Deja vu, huh?")
subject = ("Treehouse loves " + "name")

3 Answers

you have it in quotes so it is being interpreted as a string, not a variable. try removing the quotes around name.

You shouldn't use name in double quotes or Python will think you want to literally use the string "name", not the string that the name variable holds.

Once you fix this, your code will end up something like this:

name = "Alex"
subject = "Treehouse loves " + name

I hope this helps :grin:

Happy coding! :tada:

:dizzy: ~Alex :dizzy:

EDITED

It is still marking as incorrect keeps saying: "Make sure 'subject' ends with your name.

Also remove parentheses. Cheers.