Hello all I'm unsure how to solve this challenge. I've tried a function also - no luck, please advise, many thanks
I've tried defining a function for this, to no avail, and am a bit stuck with this challenge.
Not sure if my logic is flawed, or if I'm making a silly mistake with this one here.
Help would be very much appreciated!
import sys start_movie = input("Do you want to start the movie? Y/n") if start_movie != "n" or "N": print("Enjoy the show! ") else: sys.exit()
Steve HunterTreehouse Moderator 57,546 Points
You have to write the conditional tests in full; you can't use
or like that.
You'd need to have:
if start_movie != "n" or start_movie != "N":
However, working through your logic, you'd need both to be
!= so you should use
and. Alternatively, use
.lower() to simplify the tests:
if start_movie.lower() != "n":
I hope that helps,