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

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.