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

Jack Edmonds
Jack Edmonds
2,466 Points

Name subject

why dose it say Make sure your variable subject ends with your name. When I've already got it ending with my name.

strings.py
name = "Deja vu, huh"
subject = "Treehouse loves " + "Jack"

3 Answers

andren
andren
28,558 Points

I think you might have slightly misunderstood the first task. During that task you were supposed to assign your own name to the name variable. Then in the second task you are meant to concatenate that variable to the "Treehouse loves " string rather than typing your name into a string.

Like this:

name = "Jack"
subject = "Treehouse loves " + name
Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

The name variable should be assigned to your name

# example
name = "James"

Then you should add the variable name to the variable subject

# example
subject = "Hello there " + name