Python Python Basics (2015) Letter Game App Exiting

Doyle Lardell
Doyle Lardell
Pro Student 888 Points


looks like i did everything right
import sys
while True:
    start = input("If you want to start movie enter any button, if not press n: ")
    if start.lower() == 'n':
            print("Enjoy the show!")

1 Answer

Hi there!

So close! I suspect that you're main error happened when you were editing or refactoring your code. Your if/else block currently has a elif with no condition. It's safe to use an else there in this case, and you need to unindent that to match the if higher up. Finally this specific question doesn't need a loop. That's good thinking though - quite often if you're asking for imput from a user you would want to use a loop to ensure that the user gives you the "right" kind of input, but in this case we don't need it. :)

Hope it helps!