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 Formatting

Python Basics I'm currently stumped

Okay, so I can't get this Code Challenge completed. I believe I'm doing it correctly, but I still could be wrong. Thank you for helping me.

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

6 Answers

K Cleveland
K Cleveland
21,839 Points

Hey! Your spacing is off for this challenge. Check out your code and what the challenge wants:

#your code
 "Treehouse loves {} "

#what the challenge wants
 "Treehouse loves {}"

Hope this helps! Good luck!

Hey Keaunna Cleveland, Thank you for helping me and... IT WORKS!!! Thank so much. I was stuck on this for three days, and someone helped me. I can finally move on and complete the course. Thank you so much, you are a programmers life saver!

K Cleveland
K Cleveland
21,839 Points

Awesome! Glad you can keep going :D

K Cleveland
K Cleveland
21,839 Points
subject = "Treehouse loves {} " .format(name)

Check out your spacing in this line. Hope that helps. Thanks!

Hey Keaunna Cleveland, Thank you for trying to help me, but it didn't work.

Frank Covello
Frank Covello
413 Points

You have a space added where it shouldn't be in the line.

Hey Frank, Thank you for trying to help me, but it doesn't work I have typed this in the console.

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

I have also typed this in the console

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

I also have tried this

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

All of those examples work on the console, but don't work on the Code Challenge.

Hey Keaunna Cleveland, Thank you for trying, but it doesn't work.

K Cleveland
K Cleveland
21,839 Points

Post here what you're using to complete the code challenge. I'll try it on my end. Thanks!