Fausto Busuito
commited on
Commit
·
c26e144
1
Parent(s):
5b846f1
Application changes
Browse files
app.py
CHANGED
@@ -51,13 +51,13 @@ def quiz():
|
|
51 |
required_answers = 2 if 'SELECT TWO' in question['question'] else 3
|
52 |
if len(answers) == required_answers:
|
53 |
session['answers'].append(answers)
|
54 |
-
correct_answers = [str(
|
55 |
if set(answers) == set(correct_answers):
|
56 |
session['score'] += 1
|
57 |
else:
|
58 |
if answers:
|
59 |
session['answers'].append(answers)
|
60 |
-
correct_answers = [str(
|
61 |
if set(answers) == set(correct_answers):
|
62 |
session['score'] += 1
|
63 |
session['current_question'] += 1
|
|
|
51 |
required_answers = 2 if 'SELECT TWO' in question['question'] else 3
|
52 |
if len(answers) == required_answers:
|
53 |
session['answers'].append(answers)
|
54 |
+
correct_answers = [str(ord(x) - ord('A')) for x in question['correct']]
|
55 |
if set(answers) == set(correct_answers):
|
56 |
session['score'] += 1
|
57 |
else:
|
58 |
if answers:
|
59 |
session['answers'].append(answers)
|
60 |
+
correct_answers = [str(ord(x) - ord('A')) for x in question['correct']]
|
61 |
if set(answers) == set(correct_answers):
|
62 |
session['score'] += 1
|
63 |
session['current_question'] += 1
|