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 Meet Python Using Input

Assertion error

I keep having an assertion error, not sure what is wrong with the code

using_input.py
favorite_color = input("What is your favorite color?")
print("The color " + favorite_color + "is a great color!")

2 Answers

Alex Koumparos
seal-mask
.a{fill-rule:evenodd;}techdegree
Alex Koumparos
Python Development Techdegree Student 36,887 Points

Hi Mathew

Look carefully at the rest of the error message you are receiving, specifically where it compares what your code produces to what the code should produce: Your code produces:

'The color Mauveis a great color!'

Your code should produce:

'The color Mauve is a great color!'

Here's another clue: what do you have at the end of your string "The color " that is missing from the beginning of the string "is a great color!"?

Hope that helps

Alex

Brendon Butler
Brendon Butler
4,254 Points

You're missing a space at the beginning of "is a great color!" it should be " is a great color!"

Thanks a lot, that helped