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 Create a Variable

Im using the variable i created in task one but it is not finding my favorite color. What am i doing wrong?

f

using_variables.py
favorite_color = ("blue")
print('The color favorite_color is my favorite!')

2 Answers

Xavier Bass
PLUS
Xavier Bass
Courses Plus Student 2,246 Points

take the () off from around your color so that it looks like this: "blue" and dont forget to indent

Magnus Lindberg Christensen
Magnus Lindberg Christensen
2,231 Points

it should look like the following:

favorite_color = "blue"

print("The color", favorite_color, "is my favorite!")

remember to put favorite_color outside the string for it to be called. remember that the print statement shall NOT be indented as this will cause an Indentation Error saying 'unexpected indent'.