ch12 part8
<!DOCTYPE html>
<html lang="en">
<head>
<title>🧠 Science Quiz – Ecosystem Balance and Environmental Effects</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 – Ecosystem Balance and Environmental Effects</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. Pond mein pollution ke kaaran plants marne lage, toh water mein oxygen par kya effect ho sakta hai?",
options: [
"(a) Oxygen ki quantity badh jaayegi.",
"(b) Oxygen ki quantity kam ho sakti hai.",
"(c) Oxygen ka koi effect nahi hoga.",
"(d) Water completely disappear ho jaayega."
],
correct: 1,
explanation: "Aquatic plants photosynthesis ke dauran oxygen release karte hain. Agar pollution ke kaaran plants ki sankhya kam ho jaaye, toh water mein oxygen production kam ho sakta hai.<br><br><strong>Example:</strong> Polluted pond mein aquatic plants kam hone se fish ke liye available oxygen kam ho sakti hai."
},
{
question: "2. Pond mein dissolved oxygen bahut kam ho jaaye, toh fish population par kya effect ho sakta hai?",
options: [
"(a) Fish ki population hamesha badhegi.",
"(b) Fish ko oxygen ki zaroorat nahi hogi.",
"(c) Fish ki population kam ho sakti hai.",
"(d) Fish producers ban jaayengi."
],
correct: 2,
explanation: "Fish respiration ke liye water mein dissolved oxygen use karti hain. Oxygen bahut kam hone par fish survive nahi kar paati hain aur unki population decrease ho sakti hai.<br><br><strong>Example:</strong> Polluted pond mein oxygen ki kami se fish ki death ho sakti hai."
},
{
question: "3. Agar pond mein fish ki population kam ho jaaye aur fish insects ke predators hon, toh insects ki population par kya effect ho sakta hai?",
options: [
"(a) Insects ki population badh sakti hai.",
"(b) Saare insects producers ban jaayenge.",
"(c) Insects ko food ki zaroorat nahi hogi.",
"(d) Insects ki population hamesha zero ho jaayegi."
],
correct: 0,
explanation: "Fish ki population kam hone se kuch insects ya unke aquatic life stages par predation kam ho sakta hai. Isse unki population badh sakti hai, agar doosre environmental factors bhi favourable hon.<br><br><strong>Example:</strong> Agar kisi pond mein insects ko khane wali fish kam ho jaaye, toh kuch insect populations increase kar sakti hain."
},
{
question: "4. Farmers pesticides ka use kyun badha sakte hain jab agricultural pests ki population increase ho jaati hai?",
options: [
"(a) Crops ko pests se protect karne ke liye",
"(b) Soil mein oxygen produce karne ke liye",
"(c) Plants ko carnivores banane ke liye",
"(d) Water ko clean karne ke liye"
],
correct: 0,
explanation: "Agricultural pests crops ko damage karte hain. Farmers pests ko control karne ke liye pesticides use kar sakte hain, lekin excessive use environment ko harm kar sakta hai.<br><br><strong>Example:</strong> Insects agar wheat plants ki leaves ko damage kar rahe hon, toh farmer pest control ke liye pesticide use kar sakta hai."
},
{
question: "5. Excessive pesticide use ka environment par kya harmful effect ho sakta hai?",
options: [
"(a) Soil aur water quality kharab ho sakti hai.",
"(b) Har type ke organism ko benefit hoga.",
"(c) Pollution hamesha completely khatam ho jaayega.",
"(d) Ecosystem mein koi change nahi hoga."
],
correct: 0,
explanation: "Pesticides ka excessive ya improper use soil aur water ko contaminate kar sakta hai. Isse non-target organisms aur human health bhi affect ho sakti hai.<br><br><strong>Example:</strong> Rainwater fields se pesticides ko nearby ponds mein le ja sakta hai, jisse aquatic organisms ko harm ho sakta hai."
},
{
question: "6. India mein frog legs ke large-scale harvesting se kya problem hui thi?",
options: [
"(a) Frog population increase hui thi.",
"(b) Frog population decline hui thi.",
"(c) Agricultural pests completely disappear ho gaye the.",
"(d) Pond pollution hamesha ke liye khatam ho gaya tha."
],
correct: 1,
explanation: "1980s mein frog legs ke large-scale harvesting se frogs ki population kam hui. Frogs insects ko khaate hain, isliye frogs ki kami se agricultural pests badh sakte the.<br><br><strong>Example:</strong> Agar fields mein frogs kam ho jaayen, toh kuch insects ko control karne wale natural predators bhi kam ho jaate hain."
},
{
question: "7. Frogs agricultural ecosystem mein farmers ki help kaise karte hain?",
options: [
"(a) Crops ko uproot karke",
"(b) Insects aur agricultural pests ko khaakar",
"(c) Pesticides produce karke",
"(d) Plants ki photosynthesis rok kar"
],
correct: 1,
explanation: "Frogs kai insects ko food ke roop mein khaate hain. Isse kuch pest populations naturally control ho sakti hain aur farmers ko help mil sakti hai.<br><br><strong>Example:</strong> Frog field mein harmful insects ko kha sakta hai, jisse crops ko hone wala damage kam ho sakta hai."
},
{
question: "8. Government of India ne frog legs ke export par ban kyun lagaya tha?",
options: [
"(a) Frogs ko plants mein convert karne ke liye",
"(b) Frogs ki population aur ecosystem ko further damage se protect karne ke liye",
"(c) Insects ki population badhane ke liye",
"(d) Farmers ko pesticides zyada use karne ke liye"
],
correct: 1,
explanation: "Large-scale frog harvesting se frog populations decline hui aur agricultural pests badhne ka risk hua. Export ban ka purpose further ecological damage ko rokna tha.<br><br><strong>Example:</strong> Kisi important predator ki population protect karne se ecosystem ke natural balance ko maintain karne mein help mil sakti hai."
},
{
question: "9. Ecosystem ka balance dynamic hone ka kya meaning hai?",
options: [
"(a) Ecosystem mein kabhi koi change nahi hota.",
"(b) Ecosystem ki populations aur resources time ke saath change hote rehte hain.",
"(c) Ecosystem mein sirf plants rehte hain.",
"(d) Ecosystem mein sirf abiotic components hote hain."
],
correct: 1,
explanation: "Ecosystem ka balance fixed nahi hota. Organisms ki population, food availability, temperature aur water conditions change ho sakti hain. Ecosystem in changes ke response mein adjust karta hai.<br><br><strong>Example:</strong> Winter mein migratory birds kisi region mein aa sakte hain aur summer mein doosre region mein chale jaate hain."
},
{
question: "10. Nature mein ek small change cascading effects kaise create kar sakta hai?",
options: [
"(a) Ek change sirf ek organism ko affect karta hai.",
"(b) Ek change food chain ke through multiple organisms aur environment ko affect kar sakta hai.",
"(c) Ek change ka doosre organisms se koi relation nahi hota.",
"(d) Har change ecosystem ko improve hi karta hai."
],
correct: 1,
explanation: "Ecosystem mein organisms ek-doosre par depend karte hain. Ek organism ki population change hone se food availability aur doosre organisms ki population bhi change ho sakti hai. Aise effects aage tak spread ho sakte hain.<br><br><strong>Example:</strong> Frogs kam → kuch insect pests zyada → crops ko zyada damage → pesticide use badhne ka risk → soil aur water pollution ka risk."
}
];
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>