Multiple-Choice Quiz
I've got two levels, once you choose one and complete it, you will get a question 'Choose another level', but after I press the second level, it stops. I need some advice on how to keep it running. Please help! Thank you!
18jamesea
use a loop
You don't have code to go back to the beginning, so that second choice gets interpreted as Python. Neither
a
norb
are valid Python code, so that's why you're getting an error.To make your code go back to the beginning, put your whole program in a
while
loop:I've tried it, it still doesn't work. @SixBeeps
@YYChen3 Looks like you got rid of it while I was away. Did you put everything under the
while
? (As in, did you indent everything as well?)Yes, I did. But it still didn't work. @SixBeeps
@YYChen3 You didn't indent everything
@YYChen3 Everything needs to be included
@YYChen3 Honestly it's better to just select everything under the
while
and hit tabThank you! @SixBeeps