Mr-67 commited on
Commit
2c2de63
·
verified ·
1 Parent(s): acdad26

Delete quiz.html

Browse files
Files changed (1) hide show
  1. quiz.html +0 -39
quiz.html DELETED
@@ -1,39 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Math Quiz</title>
5
- <script>
6
- document.addEventListener("DOMContentLoaded", function () {
7
- let timeLeft = {{ session.get("time_per_question", 20) }};
8
-
9
- function updateTimer() {
10
- document.getElementById("timer").innerText = "Time left: " + timeLeft + "s";
11
- if (timeLeft <= 0) {
12
- clearInterval(timer);
13
- document.getElementById("answer-input").value = "TIMEOUT";
14
- document.getElementById("answer-form").submit();
15
- }
16
- timeLeft--;
17
- }
18
-
19
- updateTimer();
20
- let timer = setInterval(updateTimer, 1000);
21
- });
22
- </script>
23
- </head>
24
- <body>
25
- <h1>Math Quiz</h1>
26
- <p><strong>Question {{ total + 1 }} of {{ num_questions }}</strong></p>
27
- <p><strong>{{ num1 }} {{ symbol }} {{ num2 }} = ?</strong></p>
28
-
29
- <p id="timer" style="font-weight: bold; color: red;">Time Left: {{ session["time_per_question"] }}s</p>
30
-
31
- <form id="answer-form" method="POST" action="{{ url_for('quiz') }}">
32
- <label for="answer">Your Answer:</label>
33
- <input type="number" id="answer-input" name="answer" required>
34
- <button type="submit">Submit</button>
35
- </form>
36
-
37
- <p>Score: {{ correct }} / {{ total }}</p>
38
- </body>
39
- </html>