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 (Retired) Ins & Outs Ins & Outs

this challenge was not explained in the previous tutorials

I need help with this challenge, none of this was covered in the previous tutorials

2 Answers

Anthony Liu
Anthony Liu
11,374 Points

You can refer to the "String Concatenation" video, it provides a lot of insight.

First objective is pretty straight forward

Second objective you can use + symbol to combine two strings

Third objective: In the video

print(name + "sleeps all night and " + name + "works all day!")

It prints out Andrew sleeps all night and Andrew works all day!

Instead of printing you are just setting the string to a variable.

name = "Andrew"
sentence = name + "sleeps all night" + name + "works all day!"

Thanks Anthony, I finally got it. I think I got confused with the "x" and "y" business thinking I was creating new variables within a variable if that makes sense.. I'm getting it! I appreciate your help!