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

Dwayne Thomas
Dwayne Thomas
720 Points

Last task check didn't work for me. Does it accept your correct answer? Otherwise the quizzes have be great fun!:-)

Last task check didn't work for me. Does it accept your correct answer? Otherwise the quizzes have be great fun!:-)

name.py

2 Answers

Samuel Webb
Samuel Webb
25,370 Points

Dwayne,

I'm sure you're probably doing it incorrectly. One of the issues I originally had was I kept making it say Sam loves Treehouse when it was supposed to be the other way around. Also, I'm pretty sure you're supposed to complete this challenge with the format() function but concatenate works too. Here are both ways to complete this:

name = 'Sam'
treehouse = 'Tree' + 'house'
email_greeting = '{} loves {}'.format(treehouse, name)

...and...

name = 'Sam'
treehouse = 'Tree' + 'house'
email_greeting = treehouse + ' loves ' + name

They both worked for me and if neither of these work for you, I'm not sure what the issue is. Hope this helps.

Cheers, Sam

Dwayne Thomas
Dwayne Thomas
720 Points

Great your first code worked for me. It's surprising though, because I thought I was trying the same answer.

Samuel Webb
Samuel Webb
25,370 Points

Glad I could help.