Skip to content
Snippets Groups Projects
Commit 4fd001a1 authored by astumpff2's avatar astumpff2
Browse files

Modified answer method to keep track of the correct answer on the variable...

Modified answer method to keep track of the correct answer on the variable score, and changed score intitial numeric property value from 100 to 0.
parent 4f47680c
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ class QuizzerApp(App):
paused = BooleanProperty(False)
correct = BooleanProperty(False)
score = NumericProperty(100)
score = NumericProperty(0)
def build(self):
inspector.create_inspector(Window, self)
......@@ -95,6 +95,8 @@ class QuizzerApp(App):
question = self.questions[-1] if len(self.questions) > 0 else self.DEFAULT_QUESTION
self.paused = True
self.correct = answer == question[2]
if self.correct:
self.score += 1
Clock.schedule_once(lambda delta: self.unpause(), PAUSE_TIME)
def unpause(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment