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

Exit .sys() challege can someone help me

can someone tell me what i did wrong please

firedoor.py
import sys

input('n','N'):
    if != n,N
        print "Enjoy the show!"
        else:
            sys.exit()

Hi there, a few pointers input() reads in a string. Also you will need to look at your indentation. Have a look at the documentation but the following may help...

import sys

answer = input("Do you want to start the movie y/n : ")
if answer != 'n' and answer != 'N':
    print("enjoy the show!")
else:
    sys.exit()    

1 Answer

John Vieyra
John Vieyra
2,826 Points

You're else is indented too far for starters. It needs to be right under the "if"