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 trialLuke McGhee
1,870 PointsI don't understand what's wrong
It says syntax error but when I look at the code in my workspaces that has the same format it runs fine.
favorite_color = "red"
print("The color" favorite_color, "is my favorite!")
2 Answers
Craig Dennis
Treehouse TeacherSomething seems to be missing on this line:
print("The color" favorite_color, "is my favorite!")
After "The color"
and before favorite_color
. You have the rest of the line correct. Notice anything missing?
Let me know if that hint doesn't do it.
Jazmin T
Courses Plus Student 234 Points,
Ruben Ponce
Full Stack JavaScript Techdegree Student 12,035 PointsRuben Ponce
Full Stack JavaScript Techdegree Student 12,035 PointsI don't know Python, but I ran the code like this: // favorite_color = "red"
print("The color " + favorite_color + " is my favorite!") // I am guessing you are just missing the + signs, and don't forget to put spaces in your strings to make the sentence come out good.