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

The color [YOUR FAVORITE COLOR] is my favorite!

i don't get it

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

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

3 Answers

you need the print the variable favorite_color to the screen and also i must be in a sentence. something like:

print("heloo" + var + "bye")

Goodluck

be "var" i mean the variable "favorite_color"

akoniti
akoniti
1,410 Points

This is just asking you to use the favorite_color variable you created in Step 1 in a sentence you write to the screen.

You'll use the print function to do this.

Hint: Don't forget to place quotes around the text, and use commas to separate the text and variable, like so:

print ("Text", variable, "text")

Good luck! :)