Randomly Printing "True" Instead of Question
eighty (1)

For reasons I can't quite work out, after answering a few questions, it'll print the text "True" instead of a question. However, it's still possible to answer the question correctly, since there's still a valid answer.

I believe this is tied to the fact that I'm checking for repeat random numbers, and something is going wrong there. I'm not sure though, and even if I was, I have no idea how to solve the problem.

Help is appreciated.

You are viewing a single comment. View All
ArchieMaclean (590)

On line 33, you set one of the questions to equal True:

questions[question_num] = True

This means that as the quiz continues, each question is set to True after it is answered.

Did you mean to do?

repeat_check[question_num] = True

Please mark as the answer if this solved your problem :)

eighty (1)

@ArchieMaclean Thanks for pointing that out! I missed that little typo.