Level 1 - Factors and Multiples Quiz
nbsp; <label><input type="radio" name="q1" value="d"> 11</label></div>
</div>
<div class="question">
<p>2. Which of the following is a multiple of 9?</p>
<div class="options">
<label><input type="radio" name="q2" value="a"> 27</label>
<label><input type="radio" name="q2" value="b"> 26</label>
<label><input type="radio" name="q2" value="c"> 25</label>
<label><input type="radio" name="q2" value="d"> 23</label>
</div>
</div>
<div class="question">
<p>3. The factors of 18 are:</p>
<div class="options">
<label><input type="radio" name="q3" value="a"> 1, 2, 3, 6, 9, 18</label>
<label><input type="radio" name="q3" value="b"> 1, 3, 5, 9, 18</label>
<label><input type="radio" name="q3" value="c"> 1, 2, 6, 12, 18</label>
<label><input type="radio" name="q3" value="d"> 2, 4, 6, 8, 18</label>
</div>
</div>
<div class="question">
<p>4. Which number is a common multiple of 4 and 6?</p>
<div class="options">
<label><input type="radio" name="q4" value="a"> 12</label>
<label><input type="radio" name="q4" value="b"> 18</label>
<label><input type="radio" name="q4" value="c"> 20</label>
<label><input type="radio" name="q4" value="d"> 24</label>
</div>
</div>
<div class="question">
<p>5. How many factors does 15 have?</p>
<div class="options">
<label><input type="radio" name="q5" value="a"> 2</label>
<label><input type="radio" name="q5" value="b"> 3</label>
<label><input type="radio" name="q5" value="c"> 4</label>
<label><input type="radio" name="q5" value="d"> 5</label>
</div>
</div>
<div class="question">
<p>6. The smallest multiple of every number is:</p>
<div class="options">
<label><input type="radio" name="q6" value="a"> The number itself</label>
<label><input type="radio" name="q6" value="b"> 1</label>
<label><input type="radio" name="q6" value="c"> 0</label>
<label><input type="radio" name="q6" value="d"> Infinity</label>
</div>
</div>
<div class="question">
<p>7. Which of the following numbers is a multiple of both 2 and 5?</p>
<div class="options">
<label><input type="radio" name="q7" value="a"> 15</label>
<label><input type="radio" name="q7" value="b"> 20</label>
<label><input type="radio" name="q7" value="c"> 25</label>
<label><input type="radio" name="q7" value="d"> 35</label>
</div>
</div>
<div class="question">
<p>8. Which of these numbers is prime?</p>
<div class="options">
<label><input type="radio" name="q8" value="a"> 21</label>
<label><input type="radio" name="q8" value="b"> 17</label>
<label><input type="radio" name="q8" value="c"> 27</label>
<label><input type="radio" name="q8" value="d"> 35</label>
</div>
</div>
<div class="question">
<p>9. Which is the greatest factor of any number?</p>
<div class="options">
<label><input type="radio" name="q9" value="a"> 0</label>
<label><input type="radio" name="q9" value="b"> 1</label>
<label><input type="radio" name="q9" value="c"> The number itself</label>
<label><input type="radio" name="q9" value="d"> Infinity</label>
</div>
</div>
<div class="question">
<p>10. Which is the least common multiple of 3 and 7?</p>
<div class="options">
<label><input type="radio" name="q10" value="a"> 10</label>
<label><input type="radio" name="q10" value="b"> 14</label>
<label><input type="radio" name="q10" value="c"> 21</label>
<label><input type="radio" name="q10" value="d"> 28</label>
</div>
</div>
<button type="button" id="submit">Submit</button>
</form>
<div id="result"></div>
<script>
const answers = {
q1: "b",
q2: "a",
q3: "a",
q4: "a",
q5: "c",
q6: "a",
q7: "b",
q8: "b",
q9: "c",
q10: "c"
};
document.getElementById("submit").addEventListener("click", function() {
let score = 0;
for (let q in answers) {
const options = document.getElementsByName(q);
let answered = false;
options.forEach(option => {
if (option.checked) {
answered = true;
if (option.value === answers[q]) {
option.parentElement.classList.add("correct");
score++;
} else {
option.parentElement.classList.add("incorrect");
}
}
if (option.value === answers[q]) {
option.parentElement.classList.add("correct");
}
});
if (!answered) {
options.forEach(option => {
if (option.value === answers[q]) {
option.parentElement.classList.add("correct");
}
});
}
}
document.getElementById("result").textContent = `Your Score: ${score}/10`;
document.getElementById("submit").disabled = true;
});
</script>
</body>
</html>
