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

Giulia Merlo
Giulia Merlo
188 Points

Not sure what I'm doing wrong

Hello

I don't really understand what the task is asking/what I'm doing wrong here?

strings.py
name = ' Giulia'
subject = 'Treehouse loves  '
print(subject + name)

2 Answers

Hi Giulia

The task wants you to create a variable name which contains the string 'yourname'. The second part of the challenge wants you to create a variable name subject which concatenates the string "Treehouse Loves "+name. Your were very close with your code.

see below

name = 'Giulia' # remove the space from the front of your name
subject = 'Treehouse loves '+name # concatenate the string "Treehouse loves" and your variable name

happy coding

Chris Howell
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Howell
Python Web Development Techdegree Graduate 49,702 Points

Giulia Merlo

If Andreas cormack's answer helped you, be sure to mark his answer as "Best Answer".

This helps others that are learning troubleshoot a similar problem and pulls your question out of the unanswered section. :)