From: W. Trevor King Date: Tue, 5 Feb 2013 14:07:18 +0000 (-0500) Subject: Make get_question() a bit more interesting X-Git-Tag: v0.1~76 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=338e808cc82da583dc53626cda31cbbe9c7faafc;p=quizzer.git Make get_question() a bit more interesting --- diff --git a/quizzer/ui/__init__.py b/quizzer/ui/__init__.py index afb0726..eb8682d 100644 --- a/quizzer/ui/__init__.py +++ b/quizzer/ui/__init__.py @@ -10,7 +10,8 @@ class UserInterface (object): raise NotImplementedError() def get_question(self): - return self.quiz[0] + remaining = [q for q in self.quiz if q not in self.answers] + return remaining[0] def process_answer(self, question, answer): if question not in self.answers: