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

I couldn't finish it. Even though i was putting a comma after it, the variable was not showing

I cant seem to properly finish this task.

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

2 Answers

Ines Fazlić
seal-mask
.a{fill-rule:evenodd;}techdegree
Ines Fazlić
Python Web Development Techdegree Student 9,569 Points

Hi, you are missing " in your code. So it would be print("The color", favorite_color, "is a great color!"). this is because "The color" is a string, favorite _color is the variable name and "is a great color" is also a string., and string have beginning and ending quotes. I hope this helps :)

ps. it would also be nice to put a space before the ending quotes in input, so it looks better for the user, once I put an extra space there and it wouldn't pass because the teacher counted on one. so it is nice to check those out also, so they are exactly the same as they are in the task.

Thank you for that!!