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 say task One is no longer valid?

What am i doing wrong?

strings.py
name= ("Joshua")
subject= ("Treehouse loves" + name")

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Joshua,

That error pretty much always means that you have introduced a significant syntax error in the current task that breaks the code checker on the previous task.

Here, for some reason you have parenthesis surrounding your values. When you assign values to variables, they do not take parenthesis as they are not methods. I'm not sure why task one passed you with the above code snippet. There cannot be parenthesis.

name = "Jason"

For the second task, you are close, but you have an extra quotation mark after the variable, and the parenthesis need to again be removed.

Hope this helps.

Keep Coding! :) :dizzy:

Thank You!

Antonio De Rose
Antonio De Rose
20,885 Points
name= ("Joshua") #could you please check, is this how to assign a variable, do you need paranthesis
subject= ("Treehouse loves" + name") #make sure about the extra white space after "loves"