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

Justin Kinney
Justin Kinney
445 Points

how would i format the last challenge task?

for the I\O code challenge it states create a var email_greetings (done) then it says gave it say x loves y. would we rename the var's or would we use existing var's?

4 Answers

Samuel Webb
Samuel Webb
25,370 Points

By using concatenation with the + operator like this:

name = 'Sam'
treehouse = 'Tree' + 'house'
email_greeting = treehouse + ' loves ' + name
Justin Kinney
Justin Kinney
445 Points

thats exactly what I put and it says try again...

Samuel Webb
Samuel Webb
25,370 Points

Are you sure you're spelling everything correctly? Copy/paste mine into your code challenge and it should work. I tested it out before posting and it passed for me.

Justin Kinney
Justin Kinney
445 Points

okay Ill try and that could be it, its hard typing with a cast

Justin Kinney
Justin Kinney
445 Points

it worked! what had happend was wasn't putting a space between the ' and love so i was putting it like this 'Loves' and not ' Loves '. haha Thank you sooo much