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 trialKevin Lankford
1,983 Points"Didn't get right response from start_movie"
Not quite sure why this one is not running, it runs ok in the console but I'm not sure where to fix this error....
import sys
def whatever():
something = input(str("Would you like to start the movie? Y/n: "))
if something.lower() != "n":
print("Enjoy the show!")
else:
sys.exit()
2 Answers
Wairton Rebouças
8,225 PointsHi, just place your code outside a function
something like this:
something = input(str("Would you like to start the movie? Y/n: "))
if something.lower() != "n":
print("Enjoy the show!")
else:
sys.exit()
Note that you don't need that str call inside the input call, just the string input("Would you like to start the movie? Y/n: ")
Kevin Lankford
1,983 PointsI noticed that there was no func def on a related question I saw regarding this challenge! I thought to keep it in for good coding practice. Thank you!