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!
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
I tried this out in the console and it works fine?
I'd love to know what I did wrong? I did everything in the instructions and I also put it into workspaces and it worked like a charm.
Do you know the problem?
import sys def start_movie(): user = input("Do you want to start the movie? Y/n ") if user != 'n'.lower(): print("Enjoy the show!") else: sys.exit() start_movie()
Stuart Wright41,118 Points
You have the right idea, but your logic isn't quite correct:
if user != 'n'.lower():
'n'.lower() is just 'n', always. And we're not translating the user variable to lowercase. So if I input 'N', it will say "Enjoy the show!". To fix this, you need to use the .lower() method on user, rather than 'n'.
You need to call
user, not on