Python Python Basics (2015) Letter Game App Exiting

What am i doing wrong?

What am i doing wrong here?

firedoor.py
import sys
def movie():
    start = input("Do you want to start the movie? ")
    if start.lower() == "n":
        sys.exit(movie)
    else:
        print("Enjoy the show!")

1 Answer

Logan R
Logan R
22,666 Points

Hey!

You're super close. The problem is that sys.exit() should not take an argument for this challenge. Also, you need to call your function since it doesn't ask for the code to be inside of one.

import sys
def movie():
    start = input("Do you want to start the movie? ")
    if start.lower() == "n":
        sys.exit()
    else:
        print("Enjoy the show!")

movie()

Hope this helps!

Ty very much!

Logan R
Logan R
22,666 Points

Glad I could help :)