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

Hi I am on Challenge task 2 of 2 and when I type in my code it keeps saying it looks like task 1 is no longer passable??

So far I put in name = "darrin" subject += "treehouse lover"

Am I doing something wrong?

strings.py
name = "paulyn"
subject += "treehouse loves"

2 Answers

Alex Koumparos
seal-mask
.a{fill-rule:evenodd;}techdegree
Alex Koumparos
Python Development Techdegree Student 36,887 Points

Hi Darrin,

Don't take the 'Looks like Task x is no longer passing' messages at face value. The automated task checker quite often implies there is a problem with a previous task when actually the problem is only in the current task.

In your case, it looks like there are a couple of problems.

First, you've used the += operator which means 'add the value on the right to the already-existing variable on the left'. But in your case, subject is not an already-existing variable. You want to use the regular assignment operator when putting a value in a brand-new variable:

subject = 'some value here'

The next problem is that you are not doing anything with the name variable in the line where you create subject. This is where you would use the + operator:

subject = 'some value here' + name

The next problem is that your 'treehouse loves' string needs a trailing space, otherwise you'd just get: "treehouse lovespaulyn":

subject = 'treehouse loves ' + name

The next problem is that you are not using the same case as the Task. Remember that these tests are almost always case sensitive so you need to be careful that you are replicating the text exactly. In the case of the Task they are capitalising 'Treehouse'.

Hope these help. Good luck!

Thank you sir for the clarity of your answer! I am going to try it out now!