Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Python Data Types String Formatting

Treehouse is extraordinarily frustrating in Python Basics task 2 of 2.

Unfortunately having the same problem as with other quizzes; what I thought I was taught in the video tutorial just doesn't cut it in the quiz and not one of the 20 different codes I've tried have been accepted, have tried changing everything I can think of and at this point I think it would be more productive if Treehouse could simply correct me and let me know what it wants me to do and then ask me a new question. Instead every time I try a new way of writing the code I'm told its wrong and that task 1 is no longer being accepted. I don't know what I am supposed to do to move on from this task, please help.

Have also tried subject = "Treehouse loves{}" print(subject.format(name)) subject = "Treehouse loves {name}" print(subject.format(name)) subject = "Treehouse loves {}" print(subject.format(Melissa)) etc.

strings.py
name = "Melissa"
subject = "Treehouse loves {}" 
subject.format(name)

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,179 Points

The grader wants the last two lines combined:

name = "Melissa"
subject = "Treehouse loves {}".format(name)