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 trialMona Jalal
4,302 Pointsperplexed 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()
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
jcorum
71,830 PointsMona, 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()
jcorum
71,830 PointsThey 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.
Mona Jalal
4,302 PointsMona Jalal
4,302 PointsThank you. Not sure why it was asking for start_movie