ch12 part12
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Sustainable Farming & Human-Made Ecosystems 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;
}
.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>🧠 Sustainable Farming & Human-Made Ecosystems Quiz</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. Well-designed human-made ecosystems environment ko kaise benefit kar sakte hain?",
options: [
"A. Pollution badhakar",
"B. Biodiversity ko support karke",
"C. Saare organisms ko remove karke",
"D. Soil erosion badhakar"
],
correct: 1,
explanation: "Properly designed human-made ecosystems pollution reduce karne, biodiversity support karne aur recreation ke liye useful spaces provide karne mein help kar sakte hain.<br><br><strong>Example:</strong> Ek well-maintained park birds, butterflies aur different plants ko shelter provide kar sakta hai."
},
{
question: "2. Farmers synthetic fertilisers ka use mainly kyun karte hain?",
options: [
"A. Crop production badhane ke liye",
"B. Soil ke saare microorganisms ko badhane ke liye",
"C. Pollination rokne ke liye",
"D. Groundwater ko waste karne ke liye"
],
correct: 0,
explanation: "Synthetic fertilisers crops ko nutrients provide karte hain aur crop growth aur production badhane mein help kar sakte hain. Lekin inka excessive aur improper use environment aur soil health ko harm kar sakta hai.<br><br><strong>Example:</strong> Wheat field mein suitable quantity mein fertiliser dene se crop growth improve ho sakti hai."
},
{
question: "3. Excessive irrigation ka soil ecosystem par kya effect ho sakta hai?",
options: [
"A. Soil organisms disturb ho sakte hain",
"B. Saare soil organisms hamesha increase hote hain",
"C. Soil mein pollution kabhi nahi hota",
"D. Soil ko water ki zaroorat nahi rehti"
],
correct: 0,
explanation: "Heavy irrigation soil ke natural conditions ko change kar sakti hai aur earthworms jaise organisms ko disturb kar sakti hai. Excessive groundwater extraction se water resources bhi kam ho sakte hain.<br><br><strong>Example:</strong> Agar farmer zaroorat se zyada groundwater pump kare, toh local groundwater level neeche ja sakta hai."
},
{
question: "4. Earthworms soil ke liye useful kyun hote hain?",
options: [
"A. Woh soil ko hamesha polluted karte hain",
"B. Woh soil health aur nutrient cycling mein help karte hain",
"C. Woh crops ki pollination karte hain",
"D. Woh saare plants ko destroy karte hain"
],
correct: 1,
explanation: "Earthworms soil ko loosen karne aur organic matter ke decomposition mein help karte hain. Isse soil structure aur nutrient availability improve ho sakti hai.<br><br><strong>Example:</strong> Compost-rich garden soil mein earthworms organic material ko break down karne mein help karte hain."
},
{
question: "5. Repeated ploughing ka ek possible harmful effect kya hai?",
options: [
"A. Soil organisms disturb ho sakte hain",
"B. Soil mein hamesha humus badhta hai",
"C. Pesticides ki zaroorat hamesha khatam ho jaati hai",
"D. Groundwater automatically increase hota hai"
],
correct: 0,
explanation: "Baar-baar ploughing karne se soil structure aur earthworms jaise organisms ka habitat disturb ho sakta hai. Isliye farming practices ko soil ki condition ke according manage karna chahiye.<br><br><strong>Example:</strong> Unnecessary repeated tilling se field ki soil structure aur soil organisms affect ho sakte hain."
},
{
question: "6. Pests pesticide-resistant kaise ban sakte hain?",
options: [
"A. Jab susceptible pests mar jaate hain aur resistant pests survive karke reproduce karte hain",
"B. Jab farmers compost use karte hain",
"C. Jab bees flowers par baithti hain",
"D. Jab soil mein humus hota hai"
],
correct: 0,
explanation: "Pesticides ke repeated use se resistant pests ko survive karne ka advantage mil sakta hai. Ye reproduce karke resistant population badha sakte hain, jisse pest control difficult ho jaata hai.<br><br><strong>Example:</strong> Agar kuch insects pesticide se nahi marte aur unke offspring bhi resistant hote hain, toh wahi pesticide future mein less effective ho sakta hai."
},
{
question: "7. Monoculture se pollinators par kya effect pad sakta hai?",
options: [
"A. Pollinators ko hamesha unlimited food milta hai",
"B. Biodiversity kam hone se pollinators affect ho sakte hain",
"C. Saare pollinators predators ban jaate hain",
"D. Pollination ki koi importance nahi rehti"
],
correct: 1,
explanation: "Ek hi crop repeatedly ugane se field mein plant diversity kam ho sakti hai. Isse bees aur butterflies jaise pollinators ke food aur habitat par effect pad sakta hai.<br><br><strong>Example:</strong> Different flowering plants wala farm bees ko alag-alag seasons mein nectar provide kar sakta hai."
},
{
question: "8. Crop rotation ka main benefit kya hai?",
options: [
"A. Har season same crop ugana",
"B. Soil health maintain karne aur pest problems ko reduce karne mein help karna",
"C. Saare beneficial insects ko maarna",
"D. Groundwater ka excessive use karna"
],
correct: 1,
explanation: "Crop rotation mein different seasons mein same field par different crops ugayi jaati hain. Isse nutrient management improve ho sakta hai aur kuch crop-specific pests aur diseases ka cycle break ho sakta hai.<br><br><strong>Example:</strong> Ek field mein wheat ke baad suitable legume crop ugana soil nutrient management mein help kar sakta hai."
},
{
question: "9. Natural farming ka important aim kya hai?",
options: [
"A. Natural ecosystems mein unnecessary interference badhana",
"B. Synthetic inputs par dependence ko reduce karna",
"C. Soil organisms ko completely remove karna",
"D. Sirf ek crop ko permanently ugana"
],
correct: 1,
explanation: "Natural farming aur organic farming jaise approaches synthetic fertilisers aur pesticides par dependence kam karne aur soil health ko support karne ka aim rakhte hain. In methods ko local conditions ke according manage karna zaroori hai.<br><br><strong>Example:</strong> Farmer compost, crop rotation aur pest control ke natural methods ko combine kar sakta hai."
},
{
question: "10. Sustainable farming future food security ke liye important kyun hai?",
options: [
"A. Kyunki yeh soil aur natural resources ko protect karne mein help karti hai",
"B. Kyunki yeh saare insects ko khatam kar deti hai",
"C. Kyunki ismein kisi bhi type ki planning nahi chahiye",
"D. Kyunki yeh groundwater ko unlimited banati hai"
],
correct: 0,
explanation: "Food security ka matlab hai logon ko sufficient aur safe food available hona. Sustainable farming soil fertility, water resources aur biodiversity ko protect karne mein help karti hai, taaki future mein bhi food produce kiya ja sake.<br><br><strong>Example:</strong> Compost, crop rotation aur efficient irrigation use karne wala farmer soil health maintain karte hue long-term crop production support kar sakta 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 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}/${questions.length} (${s.date})</li>`
).join("");
}
</script>
</body>
</html>