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 trialTúlio Maia
1,396 PointsI don't know what is wrong with my code, can someone help me?
Don't know what is wrong with my code, can someone help me? Thanks!
import sys
comecar = input("Você deseja começar o filme?")
if comecar.lower() == "n":
sys.exit()
else:
print("Enjoy the show!")
2 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Túlio,
The code challenge isn't handling a few character that you have in your input prompt. Particuarly, ê
and ç
.
If you take those out it will pass.
Also, it's not a problem for the challenge but you should stick to consistent indentation levels to make your code more readable. sys.exit() is indented more than the print statement.
Jason Anders
Treehouse Moderator 145,860 PointsHi there Túlio.
Your code is correct. After some trial and error in the challenge, i found out that it is the non-English characters in your input
question that is causing the "Bummer" for some reason. If you change that out to something simple like Movie?
, it will pass.
Sorry, I don't know why it should matter, but it seems to.
Keep Coding! :)
Túlio Maia
1,396 PointsThanks for the answer Jason! I changed the characters and it worked perfectly! Thanks!
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsI think I need to increase my typing speed. Lol.
Túlio Maia
1,396 PointsTúlio Maia
1,396 PointsThanks for the answer Jason! I changed the characters and it worked perfectly! Thanks!