File size: 1,161 Bytes
9d0655b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
    <title>Quiz Summary</title>
</head>
<body>
    <h1>Quiz Summary</h1>

    <p>Operation: {{ operation }}</p>
    <p>Difficulty: {{ difficulty }}</p>
    <p>Lowest Number: {{ low }}</p>
    <p>Highest Number: {{ high }}</p>
    <p>Total Questions: {{ num_questions }}</p>
    <p>Correct Answers: {{ correct }} / {{ num_questions }}</p>
    <h3>Time Taken: {{ total_time }} seconds</h3>

    <h3>Question Review:</h3>
    <table border="1">
        <tr>
            <th>#</th>
            <th>Question</th>
            <th>Your Answer</th>
            <th>Correct Answer</th>
            <th>Result</th>
        </tr>
        {% for q in questions %}
        <tr>
            <td>{{ loop.index }}</td>
            <td>{{ q["question"] }}</td>
            <td>{{ q["user_answer"] if q["user_answer"] is not none else "No answer" }}</td>
            <td>{{ q["correct_answer"] }}</td>
            <td>{% if q["is_correct"] %}✅ Correct{% else %}❌ Incorrect{% endif %}</td>
        </tr>
        {% endfor %}
    </table>

    <br>
    <a href="{{ url_for('configure_quiz') }}"><button>Start New Quiz</button></a>
</body>
</html>