ch5part5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Science Quiz – Solubility Curves | APICAL CLASSES</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; }
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Solubility Curves and Crystallization</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. Solubility curve mein x-axis aur y-axis par respectively kya show kiya jaata hai?",
options: [
"A. Mass aur volume",
"B. Temperature aur solubility",
"C. Solubility aur temperature",
"D. Pressure aur temperature"
],
correct: 1,
explanation: "Solubility curve ke <b>x-axis par temperature (°C)</b> aur <b>y-axis par solubility (g per 100 g water)</b> show hoti hai."
},
{
question: "2. Solubility curve ka use karke kya determine kiya ja sakta hai?",
options: [
"A. Kisi given temperature par solute kitna dissolve ho sakta hai",
"B. Solvent ka boiling point only",
"C. Solution ka colour",
"D. Solute ka molecular mass directly"
],
correct: 0,
explanation: "Graph se given temperature par solute ki <b>solubility</b>, yani 100 g water mein maximum kitne grams solute dissolve honge, pata chal sakta hai."
},
{
question: "3. Agar compound A ki solubility 20°C par uski 60°C ki solubility se kam hai, to temperature increase karne par compound A ki solubility generally kya karegi?",
options: [
"A. Decrease hogi",
"B. Increase hogi",
"C. Zero ho jayegi",
"D. Hamesha constant rahegi"
],
correct: 1,
explanation: "Agar 60°C par solubility 20°C se higher hai, to temperature increase hone par compound A ki <b>solubility increase</b> ho rahi hai."
},
{
question: "4. Solubility graph mein compound B ki solubility 20°C par 60°C ki solubility se kam hai. Is observation se kya conclude hoga?",
options: [
"A. B ki solubility temperature ke saath increase hoti hai",
"B. B ki solubility temperature ke saath decrease hoti hai",
"C. B water mein dissolve nahi hota",
"D. B ek gas hai"
],
correct: 0,
explanation: "60°C par B ki solubility 20°C se greater hai, isliye temperature increase karne par <b>B ki solubility increase</b> hoti hai."
},
{
question: "5. Solubility curves mein kisi particular temperature par jis compound ki curve higher hai, woh compound given amount of water mein kya karega?",
options: [
"A. Kam dissolve hoga",
"B. Zyada dissolve hoga",
"C. Bilkul dissolve nahi hoga",
"D. Solvent mein convert ho jayega"
],
correct: 1,
explanation: "Higher solubility ka matlab hai ki same temperature aur same amount of water mein <b>more solute dissolve</b> ho sakta hai."
},
{
question: "6. Compound B ki solubility 60°C par 287 g per 100 g water hai aur 40°C par 241 g per 100 g water hai. Agar 60°C par 287 g B ko 100 g water mein dissolve karke saturated solution banaya aur ise 40°C tak cool kiya, to kitna B separate out hoga?",
options: [
"A. 46 g",
"B. 241 g",
"C. 287 g",
"D. 528 g"
],
correct: 0,
explanation: "40°C par sirf <b>241 g</b> B dissolve reh sakta hai. Separate hone wala amount = 287 − 241 = <b>46 g</b>."
},
{
question: "7. Jab saturated solution ko higher temperature se slowly cool kiya jaata hai aur excess solute pure solid ke form mein separate hota hai, to is process ko kya kehte hain?",
options: [
"A. Filtration",
"B. Evaporation",
"C. Crystallization",
"D. Decantation"
],
correct: 2,
explanation: "Saturated solution se cooling ke through <b>pure solid crystals</b> form karne ki process ko <b>crystallization</b> kehte hain."
},
{
question: "8. Crystal ki correct definition kya hai?",
options: [
"A. Randomly arranged liquid particles",
"B. Regular geometric pattern mein arranged particles se bana solid",
"C. Sirf gas particles ka group",
"D. Any heterogeneous mixture"
],
correct: 1,
explanation: "Crystal ek solid hota hai jisme particles <b>regular geometric arrangement</b> mein present hote hain."
},
{
question: "9. Crystallization ka use do solids ko separate karne ke liye kab kiya ja sakta hai?",
options: [
"A. Jab dono solids water mein completely insoluble hon",
"B. Jab ek compound small quantity mein ho aur dono same solvent mein soluble hon",
"C. Jab dono compounds gases hon",
"D. Jab sirf solvent present ho"
],
correct: 1,
explanation: "Crystallization ka use aise mixture mein ho sakta hai jahan <b>ek solid small quantity mein ho aur dono same solvent mein soluble hon</b>, especially jab unki solubilities temperature ke saath different change hoti hain."
},
{
question: "10. Crystallization se solids ki purification kis principle par based hai?",
options: [
"A. Different colours",
"B. Different densities only",
"C. Different solubilities at different temperatures",
"D. Different melting points only"
],
correct: 2,
explanation: "Crystallization mein purification ka main principle hai ki substances ki <b>solubility temperature ke saath different rate se change</b> ho sakti hai. Is difference ka use pure crystals obtain karne mein hota hai."
}
];
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;">
${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>${s.name} - ${s.score}/10 (${s.date})</li>`
).join('');
}
</script>
</body>
</html>