Skip to content

Commit dbb18b4

Browse files
authored
Update assignment.html
Signed-off-by: Mohamed El-Hadedy <47838875+mealycpp@users.noreply.github.com>
1 parent 421e26e commit dbb18b4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

assignment.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.question-title { font-weight: bold; }
1111
.options { margin-left: 20px; }
1212
.btn { padding: 10px 16px; background: #0055a4; color: #fff; border: none; border-radius: 4px; cursor: pointer; margin-top: 20px; }
13-
.score { font-size: 1.2em; font-weight: bold; margin-top: 20px; }
13+
.score { font-size: 1.2em; font-weight: bold; margin-top: 20px; text-align: center; }
1414
</style>
1515
</head>
1616
<body>
@@ -21,7 +21,6 @@ <h1>Ptah: Nifty Assignment Quiz</h1>
2121
<div class="score" id="finalScore"></div>
2222

2323
<script>
24-
// 40-question quiz with real content
2524
const questions = [
2625
// PQC (10)
2726
{ title: 'Which lattice-based scheme is used for digital signatures in PQC?', options: ['CRYSTALS-Kyber','CRYSTALS-Dilithium','NTRU'], answer: 'CRYSTALS-Dilithium', points: 2 },
@@ -90,7 +89,7 @@ <h1>Ptah: Nifty Assignment Quiz</h1>
9089
function submitQuiz() {
9190
let score = 0;
9291
questions.forEach((q, idx) => {
93-
const sel = document.querySelector(`input[name="q${idx}"]:checked`);
92+
const sel = document.querySelector(`input[name=\`q${idx}\`]:checked`);
9493
if (sel && sel.value === q.answer) score += q.points;
9594
});
9695
const total = questions.reduce((sum, q) => sum + q.points, 0);

0 commit comments

Comments
 (0)