Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Letter Game App Exiting

Mona Jalal
Mona Jalal
4,302 Points

perplexed by the question

the question says nothing about start_movie but I get error stating it so I thought I define a function however I still get error. Can someone help me figure what's up?

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

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

2 Answers

Mona, very close!

You don't need a function, and lower is a function not a property:

import sys

answer = input("Start the movie? Y/n ").lower()
if answer != "n":
    print("Enjoy the show!")
else:
    sys.exit()
Mona Jalal
Mona Jalal
4,302 Points

Thank you. Not sure why it was asking for start_movie

They were trying to give you the text for the input(), but yes, it could be confusing! I'm sure we've all struggled with "interpreting" what's really wanted. I know I have.