ch5part14
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APICAL CLASSES - Science Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
display: flex;
justify-content: center;
align-items: flex-start;
padding: 30px;
min-height: 100vh;
margin: 0;
}
.quiz-container {
background: #fff;
padding: 25px;
border-radius: 12px;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
width: 90%;
max-width: 800px;
}
h2 { text-align: center; color: #1e3c72; }
.branding {
text-align: center;
color: #2a5298;
font-weight: bold;
letter-spacing: 1px;
}
.question {
font-weight: bold;
margin: 15px 0;
line-height: 1.6;
}
.options label {
display: block;
margin: 8px 0;
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
line-height: 1.5;
}
.options label:hover { background: #f0f0f0; }
.options input { margin-right: 8px; }
.correct {
background-color: #c8f7c5 !important;
border-color: #28a745 !important;
}
.wrong {
background-color: #f8d7da !important;
border-color: #dc3545 !important;
}
.explanation {
background: #e9ecef;
padding: 12px;
margin-top: 10px;
border-left: 5px solid #2a5298;
display: none;
line-height: 1.6;
border-radius: 4px;
}
.controls { text-align: center; margin-top: 15px; }
button {
background-color: #2a5298;
color: white;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
margin: 5px;
}
button:hover { background-color: #1e3c72; }
input[type="text"] {
padding: 10px;
width: 65%;
border: 1px solid #ccc;
border-radius: 6px;
}
#scoreboard {
margin-top: 25px;
background: #eef3f7;
padding: 15px;
border-radius: 8px;
}
#scoreboard h3 { text-align: center; }
ol { padding-left: 20px; }
hr { border: 0; border-top: 1px solid #ddd; margin: 20px 0; }
@media(max-width:600px) {
body { padding: 10px; }
.quiz-container { width: 100%; padding: 15px; }
input[type="text"] { width: 90%; }
}
</style>
</head>
<body>
<div class="quiz-container">
<div class="branding">APICAL CLASSES</div>
<h2>🧠 Science Quiz – Mixtures & Separation Techniques</h2>
<div id="nameSection">
<p><strong>Enter your name to start:</strong></p>
<input type="text" id="userName" placeholder="Your Name">
<button onclick="startQuiz()">Start Quiz</button>
</div>
<div id="quizSection" style="display:none;">
<div id="questionContainer"></div>
<div class="controls">
<button onclick="prevQuestion()" id="prevBtn">Previous</button>
<button onclick="nextQuestion()" id="nextBtn">Next</button>
<button onclick="submitQuiz()" id="submitBtn" style="display:none;">Submit</button>
</div>
<div id="result" style="text-align:center; margin-top:20px;"></div>
<div id="scoreboard">
<h3>🏆 Scoreboard</h3>
<ol id="scoreList"></ol>
</div>
</div>
</div>
<script>
const questions = [
{
question: "1. Inmein se kaunsa classification set completely correct hai?",
options: [
"A. Air—Hm, Milk—Ht, Sugar solution—Hm, Smoke—Hm",
"B. Brass—Ht, Fog—Ht, Vinegar—Ht, Muddy water—Hm",
"C. Copper sulfate solution—Hm, Salt solution—Hm, Milk—Hm, Bronze—Hm",
"D. Muddy water—Ht, Milk—Ht, Blood—Ht, Brass—Ht"
],
correct: 2,
explanation: "Copper sulfate solution, salt solution, milk aur bronze ko given classification mein <strong>homogeneous (Hm)</strong> maana gaya hai. Brass bhi homogeneous alloy hai, isliye option D mein brass ko Ht karna wrong hai. Air aur smoke bhi option A mein correctly classified nahi hain because smoke heterogeneous colloidal mixture hai."
},
{
question: "2. Inmein se kaunse mixtures Tyndall effect show karenge?<br><br>(a) Air + dust particles<br>(b) Copper sulfate + water<br>(c) Starch + water<br>(d) Acetone + water",
options: [
"A. a aur b",
"B. b aur d",
"C. a aur c",
"D. c aur d"
],
correct: 2,
explanation: "Air mein dust particles aur starch-water jaise colloidal mixtures <strong>light scatter</strong> karte hain, isliye Tyndall effect show karte hain. Copper sulfate solution aur acetone-water true solutions hain, isliye normally Tyndall effect nahi dikhate."
},
{
question: "3. 20 g sugar ko 80 g water mein dissolve kiya gaya. Sugar solution ki mass percentage concentration kya hogi?",
options: [
"A. 20%",
"B. 25%",
"C. 80%",
"D. 100%"
],
correct: 0,
explanation: "Total solution mass = 20 + 80 = 100 g.<br><br>Sugar percentage = (Mass of solute / Mass of solution) × 100<br>= (20/100) × 100 = <strong>20% m/m</strong>."
},
{
question: "4. 120 g brass alloy mein copper 70% by mass hai. Ismein copper aur zinc ki quantities kya hongi?",
options: [
"A. 84 g copper, 36 g zinc",
"B. 70 g copper, 50 g zinc",
"C. 36 g copper, 84 g zinc",
"D. 80 g copper, 40 g zinc"
],
correct: 0,
explanation: "Copper = 70% of 120 = <strong>84 g</strong>.<br>Remaining zinc = 120 − 84 = <strong>36 g</strong>."
},
{
question: "5. Cooking oil ki density water se kam hai. Oil ko water ke saath mix karne par kya hoga aur unhe kaise separate karenge?",
options: [
"A. Oil bottom par rahega; filtration se separate hoga",
"B. Oil top par rahega; separating funnel se separate hoga",
"C. Oil water mein dissolve hoga; crystallization se separate hoga",
"D. Oil vapour banega; chromatography se separate hoga"
],
correct: 1,
explanation: "Oil aur water <strong>immiscible liquids</strong> hain. Oil ki density kam hone ke karan woh upper layer banayega. Separating funnel se dono layers separate ki ja sakti hain."
},
{
question: "6. Assertion (A): Solutions Tyndall effect show nahi karte.<br><br>Reason (R): Solution ke particles bahut small hote hain, generally 1 nm se less, isliye woh visible light ko effectively scatter nahi karte.",
options: [
"A. A aur R dono true hain, aur R correct explanation hai",
"B. A aur R dono true hain, lekin R correct explanation nahi hai",
"C. A true hai, R false hai",
"D. A false hai, R true hai"
],
correct: 0,
explanation: "True solution ke particles <strong>1 nm se smaller</strong> hote hain. Itne small particles visible light ko effectively scatter nahi karte, isliye solution Tyndall effect show nahi karta."
},
{
question: "7. Naphthalene aur sand ke mixture ko separate karne ke liye sabse suitable method kya hai?",
options: [
"A. Sublimation",
"B. Distillation",
"C. Centrifugation",
"D. Separating funnel"
],
correct: 0,
explanation: "<strong>Naphthalene sublime</strong> karta hai, jabki sand sublime nahi karta. Heating par naphthalene vapour ban jaata hai aur cooling par solid deposit ho jaata hai, isliye dono separate ho jaate hain."
},
{
question: "8. Water aur acetone ko distillation se effectively separate karna possible hai. Iska main reason kya hai?",
options: [
"A. Dono immiscible liquids hain",
"B. Acetone aur water ke boiling points mein large difference hai",
"C. Acetone solid hai",
"D. Water oil se lighter hai"
],
correct: 1,
explanation: "Acetone ka boiling point about <strong>56°C</strong> aur water ka <strong>100°C</strong> hai. Difference sufficient hone ke karan acetone pehle vapourise hota hai aur distillation se separation possible hoti hai."
},
{
question: "9. Table ke according 40°C par potassium nitrate ki solubility 62 g per 100 g water hai. 40°C par 50 g water ka saturated solution banane ke liye kitna KNO₃ chahiye?",
options: [
"A. 21 g",
"B. 31 g",
"C. 62 g",
"D. 124 g"
],
correct: 1,
explanation: "100 g water mein 62 g KNO₃ dissolve hota hai.<br>50 g water mein required amount = 62 × 50/100 = <strong>31 g</strong>."
},
{
question: "10. Sugar solutions ke liye Student A: 20 g sugar + 80 g water, Student B: 20 g sugar + 100 g water, Student C: 30 g sugar + 80 g water. Sabse concentrated solution kaunsa hai?",
options: [
"A. Student A",
"B. Student B",
"C. Student C",
"D. A aur B equally concentrated hain"
],
correct: 2,
explanation: "A = 20/100 × 100 = <strong>20%</strong>.<br>B = 20/120 × 100 ≈ <strong>16.67%</strong>.<br>C = 30/110 × 100 ≈ <strong>27.27%</strong>.<br>Isliye <strong>Student C ka solution sabse concentrated</strong> hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) {
alert("Please enter your name.");
return;
}
document.getElementById("nameSection").style.display = "none";
document.getElementById("quizSection").style.display = "block";
showQuestion();
loadScoreboard();
}
function showQuestion() {
const q = questions[currentQuestion];
const container = document.getElementById("questionContainer");
container.innerHTML = `
<div class="question">${q.question}</div>
<div class="options">
${q.options.map((opt, i) => `
<label>
<input type="radio" name="option" value="${i}"
${userAnswers[currentQuestion] === i ? "checked" : ""}>
${opt}
</label>
`).join("")}
</div>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</div>
`;
document.getElementById("prevBtn").style.display =
currentQuestion === 0 ? "none" : "inline-block";
document.getElementById("nextBtn").style.display =
currentQuestion === questions.length - 1 ? "none" : "inline-block";
document.getElementById("submitBtn").style.display =
currentQuestion === questions.length - 1 ? "inline-block" : "none";
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}
function nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) {
score++;
}
});
showResults();
saveScore(userName, score);
loadScoreboard();
}
function showResults() {
const container = document.getElementById("questionContainer");
container.innerHTML = "";
questions.forEach((q, index) => {
const selected = userAnswers[index];
let optsHTML = q.options.map((opt, i) => {
let cls = "";
if (i === q.correct) cls = "correct";
if (selected === i && selected !== q.correct) cls = "wrong";
return `<label class="${cls}">${opt}</label>`;
}).join("");
container.innerHTML += `
<div class="question">${q.question}</div>
<div class="options">${optsHTML}</div>
<div class="explanation" style="display:block;">
<strong>Explanation:</strong> ${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML = scores.map(s => {
return `<li>${escapeHTML(s.name)} - ${s.score}/10 (${escapeHTML(s.date)})</li>`;
}).join("");
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, char => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
})[char]);
}
</script>
</body>
</html>