ch13 part14
<!DOCTYPE html>
<html lang="en">
<head>
<title>🧠 Science Quiz – 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; }
.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;
}
.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 – APICAL CLASSES</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. Mars currently Earth ki tarah life support kyun nahi kar sakta?",
options: [
"A. Mars par bahut zyada volcanoes hain",
"B. Mars Sun ke bahut close hai",
"C. Mars par thick atmosphere aur stable liquid water ki kami hai",
"D. Mars ka magnetic field bahut strong hai"
],
correct: 2,
explanation: "Mars ka atmosphere Earth ke comparison mein bahut thin hai aur uski surface par liquid water long periods tak stable rehna difficult hai. Isliye Mars par Earth jaisi life ke liye conditions available nahi hain.<br><br><strong>Example:</strong> Earth ka atmosphere temperature regulate karne aur water cycle support karne mein help karta hai, jabki Mars par ye conditions bahut different hain."
},
{
question: "2. Geodiversity ka example kaunsa hai?",
options: [
"A. Forest mein birds ki different sounds",
"B. Mountains, valleys aur deserts ki variety",
"C. Pond mein different types of fish",
"D. Different plants ki variety"
],
correct: 1,
explanation: "Geodiversity ka meaning hai non-living natural features ki variety, jaise rocks, minerals, landforms aur geological processes.<br><br><strong>Example:</strong> Himalayas ke mountains, river valleys aur Thar Desert different landforms hain jo geodiversity show karte hain."
},
{
question: "3. Agar Earth same density ke saath smaller hoti, toh uski gravity par kya effect ho sakta tha?",
options: [
"A. Gravity stronger ho jaati",
"B. Gravity weaker ho jaati",
"C. Gravity completely disappear nahi hoti, balki infinite ho jaati",
"D. Gravity ka size se koi relation nahi hai"
],
correct: 1,
explanation: "Same density ke saath smaller planet ka mass kam hota. Isliye uski surface gravity bhi generally kam hoti, jisse atmosphere ko hold karna difficult ho sakta tha.<br><br><strong>Example:</strong> Agar kisi planet ki gravity atmosphere ko effectively hold na kar sake, toh gases long periods mein space mein escape kar sakti hain."
},
{
question: "4. Sexual reproduction mein offspring ke features parents se different kyun ho sakte hain?",
options: [
"A. Offspring ko genes sirf environment se milte hain",
"B. Offspring ko mixed genetic instructions dono parents se milti hain",
"C. Offspring ke paas genetic material nahi hota",
"D. Genes birth ke baad food se bante hain"
],
correct: 1,
explanation: "Sexual reproduction mein offspring genetic material dono parents se inherit karte hain. Genes ke different combinations ki wajah se offspring mein variations aa sakti hain.<br><br><strong>Example:</strong> Human siblings ke eye colour, height aur hair type mein differences ho sakte hain."
},
{
question: "5. Monsoon ke baad school ki wall ki cracks mein tiny green plants grow karne lage. Seeds wahan kaise pahunche honge?",
options: [
"A. Wind, water ya animals ke through",
"B. Sirf wall ke cement se",
"C. Sunlight se directly seeds ban gaye",
"D. Plants ko seeds ki zaroorat nahi hoti"
],
correct: 0,
explanation: "Seeds hawa, rainwater, birds ya other animals ke through wall ki cracks tak pahunch sakte hain. Moisture, suitable temperature aur light milne par seeds germinate kar sakte hain, agar wahan enough growing conditions hon.<br><br><strong>Example:</strong> Hawa se aaya hua grass seed wall ki moist crack mein grow kar sakta hai."
},
{
question: "6. Forest ko roads aur buildings ke liye cut karne ka possible effect kya hai?",
options: [
"A. Biodiversity hamesha increase hoti hai",
"B. Local temperature aur soil erosion dono decrease hote hain",
"C. Wildlife habitats destroy ho sakte hain aur water quality affect ho sakti hai",
"D. Rainfall aur water availability par koi effect nahi padta"
],
correct: 2,
explanation: "Deforestation se animals aur plants ke habitats lose ho sakte hain. Trees kam hone se soil erosion aur surface runoff increase ho sakta hai, jisse rivers mein sediment badh sakta hai aur groundwater recharge reduce ho sakta hai.<br><br><strong>Example:</strong> Forest cut hone ke baad heavy rainfall mein soil river mein beh sakti hai, jisse water muddy ho jata hai."
},
{
question: "7. Earth ke magnetic field ke suddenly disappear hone se kya problem ho sakti hai?",
options: [
"A. Earth par gravity immediately stop ho jayegi",
"B. Earth par sunlight aana completely stop ho jayega",
"C. Earth ko solar wind aur charged particles se milne wali protection reduce ho jayegi",
"D. Oceans ka water immediately disappear ho jayega"
],
correct: 2,
explanation: "Earth ka magnetic field many charged particles ko deflect karta hai. Agar magnetic field disappear ho jaye, toh space weather ke effects aur radiation exposure ke risks increase ho sakte hain. Atmosphere aur life par long-term effects bhi ho sakte hain.<br><br><strong>Example:</strong> Strong solar storms satellites, communication systems aur power grids ko disturb kar sakte hain."
},
{
question: "8. Mars par human settlement banane ke liye kaunsi three things recreate ya provide karna zaroori hoga?",
options: [
"A. Oxygen, liquid water aur suitable temperature control",
"B. Sirf sunlight, rocks aur sand",
"C. Sirf buildings, roads aur vehicles",
"D. Sirf gravity, dust aur mountains"
],
correct: 0,
explanation: "Humans ko breathe karne ke liye oxygen, drinking aur daily use ke liye water, aur safe temperature ki zaroorat hoti hai. Mars par habitats ko pressure, radiation aur temperature se bhi protect karna hoga.<br><br><strong>Example:</strong> A sealed habitat mein oxygen supply, water recycling system aur heating equipment use kiye ja sakte hain."
},
{
question: "9. Kisi village mein temperature increase ho raha hai aur rainfall unpredictable ho gayi hai. Village ko adapt karne ke liye kaunse steps useful honge?",
options: [
"A. Saare trees cut kar dena",
"B. Water conservation aur drought-resistant crops use karna",
"C. Water wastage increase karna",
"D. Rivers mein waste dump karna"
],
correct: 1,
explanation: "Changing climate se heat stress, drought aur irregular rainfall ka risk increase ho sakta hai. Rainwater harvesting aur suitable crops farmers ko changing conditions ke saath adapt karne mein help karte hain.<br><br><strong>Example:</strong> Village rooftops se rainwater collect karke store kar sakta hai aur farmers less water use karne wali crop varieties grow kar sakte hain."
},
{
question: "10. Agar Earth par atmosphere na hota, toh life aur temperature par kya effect hota?",
options: [
"A. Life aur water cycle par koi effect nahi hota",
"B. Earth ka temperature har jagah perfectly stable hota",
"C. Breathing ke liye air nahi hoti, temperature extremes badhte aur surface par liquid water stable rehna difficult hota",
"D. Plants bina kisi difficulty ke grow karte"
],
correct: 2,
explanation: "Atmosphere breathing ke liye essential gases provide karta hai, greenhouse effect ke through temperature regulate karne mein help karta hai aur water cycle ka important part hai. Atmosphere ke bina Earth par present life ko survive karna extremely difficult hota.<br><br><strong>Example:</strong> Earth ka atmosphere daytime heating aur nighttime cooling ko moderate karta hai, jabki atmosphere-less Moon par surface temperature mein extreme changes hote hain."
}
];
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 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>