ch5part8
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Science Quiz – Methods of Separation</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;
}
.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; }
.question {
font-weight: bold;
margin: 10px 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;
}
.options label:hover { background: #f0f0f0; }
.correct {
background-color: #c8f7c5 !important;
border-color: #28a745 !important;
}
.wrong {
background-color: #f8d7da !important;
border-color: #dc3545 !important;
}
.explanation {
background: #e9ecef;
padding: 10px;
margin-top: 10px;
border-left: 5px solid #2a5298;
display: none;
line-height: 1.6;
}
.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; }
#scoreboard {
margin-top: 25px;
background: #eef3f7;
padding: 15px;
border-radius: 8px;
}
#scoreboard h3 { text-align: center; }
ol { padding-left: 20px; }
#userName {
padding: 10px;
width: 90%;
border: 1px solid #ccc;
border-radius: 6px;
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Methods of Separation</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. Acetone ka boiling point about 56°C aur water ka boiling point 100°C hai. In dono ko distillation se separate karna possible kyun hai?",
options: [
"A. Dono ka boiling point same hai",
"B. Dono ke boiling points mein sufficient difference hai",
"C. Acetone water mein insoluble hai",
"D. Water solid hai"
],
correct: 1,
explanation: "Acetone aur water ke boiling points mein 44°C ka difference hai. Isliye acetone pehle vapourise ho sakta hai aur distillation se separate kiya ja sakta hai."
},
{
question: "2. Distillation ka traditional Deg-Bhapka method Kannauj mein kis purpose ke liye famous hai?",
options: [
"A. Salt purification",
"B. Natural perfumes banane ke liye",
"C. Petrol banane ke liye",
"D. Water filtration ke liye"
],
correct: 1,
explanation: "Uttar Pradesh ka Kannauj perfume capital ke naam se famous hai. Traditional Deg-Bhapka method se flowers aur plants se fragrances extract karke natural perfumes banaye jaate hain."
},
{
question: "3. First rain ke baad Earth se aane wali pleasant earthy smell ko traditional distillation se capture karke banaye gaye perfume ko kya kaha jaata hai?",
options: [
"A. Gulab Ittar",
"B. Mitti ka Ittar",
"C. Kesar Ittar",
"D. Chandan Ittar"
],
correct: 1,
explanation: "Kannauj mein first rain ke baad aane wali earthy fragrance ko traditional Deg-Bhapka method se capture karke Mitti ka Ittar banaya jaata hai."
},
{
question: "4. Crude petroleum ko petrol, kerosene, diesel aur other useful fractions mein separate karne ke liye kaunsi method use hoti hai?",
options: [
"A. Simple filtration",
"B. Crystallization",
"C. Fractional distillation",
"D. Paper chromatography"
],
correct: 2,
explanation: "Crude petroleum mein different components hote hain. Inhe unke different boiling points ke basis par fractional distillation se separate kiya jaata hai."
},
{
question: "5. Fractional distillation kab use ki jaati hai?",
options: [
"A. Jab components ke boiling points mein relatively small difference ho",
"B. Jab mixture mein sirf ek substance ho",
"C. Jab sabhi components solids hon",
"D. Jab components water mein insoluble hon"
],
correct: 0,
explanation: "Fractional distillation un mixtures ke components ko separate karne ke liye use hoti hai jinke boiling points mein relatively small difference ho. Fractionating column separation ko improve karta hai."
},
{
question: "6. Petroleum refinery mein crude petroleum se LPG kis form mein obtain ki jaati hai?",
options: [
"A. Solid crystals ke form mein",
"B. Steel cylinders mein high pressure par liquefied gas ke form mein",
"C. Water solution ke form mein",
"D. Paper par deposited pigment ke form mein"
],
correct: 1,
explanation: "Petroleum ka gaseous fraction pressure ke under liquefy karke cylinders mein store kiya jaata hai aur domestic fuel ke roop mein LPG use hoti hai."
},
{
question: "7. Paper chromatography mein black sketch-pen ink ka spot water ke rise karne par different colours mein separate ho jaata hai. Isse kya conclude hota hai?",
options: [
"A. Black ink ek pure substance hai",
"B. Black ink mein different coloured components ho sakte hain",
"C. Water colour ko destroy kar deta hai",
"D. Paper ink ko completely absorb kar leta hai"
],
correct: 1,
explanation: "Agar black ink different colour spots mein separate ho jaati hai, to iska matlab black ink different coloured substances ka mixture hai."
},
{
question: "8. Paper chromatography mein water paper ke upar ink ke components ko kaise move karata hai?",
options: [
"A. Water components ko burn karta hai",
"B. Liquid components ko paper ke along carry karta hai",
"C. Water paper ko dissolve karta hai",
"D. Water ink ko solid bana deta hai"
],
correct: 1,
explanation: "Solvent water paper mein rise karta hai aur ink ke components ko different speeds se upar carry karta hai, jisse separation hoti hai."
},
{
question: "9. Paper chromatography mein mixture ke components different distances tak kyun move karte hain?",
options: [
"A. Sabhi components ki mass exactly same hoti hai",
"B. Components ki paper aur solvent ke saath interactions different hoti hain",
"C. Paper ka colour different hota hai",
"D. Water har component ko same speed se move karta hai"
],
correct: 1,
explanation: "Different components ki paper aur solvent ke saath interaction different hoti hai. Isliye woh solvent ke saath different speeds se move karte hain aur separate ho jaate hain."
},
{
question: "10. Paper chromatography mein kya water har mixture ke components ko separate karne ke liye suitable solvent hoga?",
options: [
"A. Haan, water har case mein suitable hai",
"B. Nahi, kuch cases mein alcohol ya solvents ka mixture use karna pad sakta hai",
"C. Sirf oil use kiya ja sakta hai",
"D. Solvent ki kabhi zaroorat nahi hoti"
],
correct: 1,
explanation: "Har substance water mein suitable interaction nahi karta. Kuch mixtures ke liye alcohol ya different solvents/solvent mixtures use karne pad sakte hain."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) return alert("Please enter your name.");
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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected
? parseInt(selected.value)
: null;
}
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];
const correct = q.correct;
let optsHTML = q.options.map((opt, i) => {
let cls = "";
if (i === correct) cls = "correct";
if (selected === i && selected !== 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;">
<b>Explanation:</b><br>
${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 => `
<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>