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 (2015) Letter Game App Exiting

I 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!

firedoor.py
import sys

comecar = input("Você deseja começar o filme?")

if comecar.lower() == "n":
    sys.exit()
else:
  print("Enjoy the show!")

2 Answers

Hi 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.

Thanks for the answer Jason! I changed the characters and it worked perfectly! Thanks!

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi 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! :)

Thanks for the answer Jason! I changed the characters and it worked perfectly! Thanks!