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

string formatting

challenge task 2

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

2 Answers

Marek Zakrzewski
Marek Zakrzewski
2,920 Points

Hi there!

This way your output would be just:

Deja vu,huh
Treehouse loves  

What you need to do in this challenge is: In the first step, you create a variable with your name. Then in the second step, you need to create a new variable with 'Treehouse loves ' and concatenate your name to it, as in:

variable_a = 'abc'
variable_b = 'text' + variable_a

Additionally, you don't need to print anything out in this challenge.

Let me know if it helps, or you have any more questions.

Have a nice Sunday, and happy coding! ;)

Afloarei Andrei
Afloarei Andrei
5,163 Points

First task. Create a variable with your name. name = "Cool Broz" Second task create a variable named 'subject' that concatenates '+' the string 'Treehouse loves ' with the name. subject = "Treehouse loves " + name