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 trialAlexander Salako
2,434 PointsHow do I check that favourite_color = "blue" ?
I've used an if statement and I'm not able to check
favorite_color = input("What is your favorite color? ")
if favourite_color == "blue":
print("You must love the sky")
2 Answers
Jonathan Fernandes
Courses Plus Student 22,784 PointsI just ran the following code in my interpreter and it works fine:
color = "blue"
if color == "blue":
print("You must love the sky")
Do you mind giving me more details on the output you are getting and the environment? Because your code should be fine.
Jonathan Fernandes
Courses Plus Student 22,784 PointsOh wait... is their too much spacing on your indent? Or inconsistent spacing? In other words, is this a piece of your code and that print line is the only thing that is over-indented?
Alexander Salako
2,434 PointsAlexander Salako
2,434 PointsThanks for helping. I noticed my error. In the UK we spell favorite different so technically I was using the wrong variable name.