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

my quiz is to write 2 values using the variable favorite_color, but I don't know where to start.

  1. favorite_color = ("Green", and "Blue")
  2. print(favorite_color)

2 Answers

Steven Parker
Steven Parker
231,269 Points

It's not clear what course and lesson you are referring to. You might want to take a look at this video about Posting a Question.

But for starters, favorite_color = ("Green", and "Blue") isn't proper syntax. If you really want to include both items as your favorite color, they need to be combined into a single string, like this: favorite_color = "Green and Blue". But that's complicating the exercise, as favorite_color would normally be assigned a string naming a single color.

Add a link to the course page and I can give a more detailed and specific answer.

technically correct, but not a great answer. the syntax is wrong yes. but the code is correct. and is usable just in && form.

Steven Parker
Steven Parker
231,269 Points

Jacob Todd: I don't know what you mean by "is usable just in && form" ... are you perhaps thinking of a different language?

the word and isn't typically used in any form of programming. most professional programmer's use the ampersand.

Steven Parker
Steven Parker
231,269 Points

You are for sure thinking of another language!
This question is about the Python language, where and is a valid keyword but && is not valid.