ch3 part 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 How Do Organisms Reproduce? – Practice 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;
box-sizing: border-box;
}
.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; }
#userName {
padding: 10px;
width: 65%;
max-width: 300px;
border: 1px solid #ccc;
border-radius: 6px;
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 How Do Organisms Reproduce? – Practice 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. Unicellular organisms mein cell division ya fission ka result kya hota hai?",
options: [
"A. Tissue formation",
"B. New individuals ka creation",
"C. Sirf growth",
"D. Organ formation"
],
correct: 1,
explanation: "Unicellular organisms mein <b>cell division/fission directly new individuals</b> create kar sakta hai, kyunki ek single cell hi complete organism hota hai."
},
{
question: "2. Amoeba mein binary fission kis tarah ho sakti hai?",
options: [
"A. Sirf fixed direction mein",
"B. Sirf vertical direction mein",
"C. Kisi bhi plane mein",
"D. Sirf horizontal direction mein"
],
correct: 2,
explanation: "Amoeba ka body organisation simple hota hai, isliye usmein cell division <b>kisi bhi plane</b> mein ho sakti hai."
},
{
question: "3. Leishmania mein binary fission kis tarah hoti hai?",
options: [
"A. Randomly kisi bhi plane mein",
"B. Definite orientation mein",
"C. Multiple daughter cells ke form mein",
"D. Budding ke through"
],
correct: 1,
explanation: "Leishmania mein ek end par <b>whip-like structure</b> hota hai. Is structure ke relation mein binary fission <b>definite orientation</b> mein hoti hai."
},
{
question: "4. Plasmodium mein reproduction kaunsa type show karta hai?",
options: [
"A. Binary fission",
"B. Fragmentation",
"C. Multiple fission",
"D. Budding"
],
correct: 2,
explanation: "<b>Plasmodium</b> ek single-celled organism hai jo ek saath <b>many daughter cells</b> mein divide hota hai. Is process ko multiple fission kehte hain."
},
{
question: "5. Yeast mein new individual mainly kis process se develop hota hai?",
options: [
"A. Fragmentation",
"B. Budding",
"C. Regeneration",
"D. Multiple fission"
],
correct: 1,
explanation: "Yeast apne body par ek <b>small bud</b> develop karta hai. Ye bud grow karta hai aur eventually parent se separate hokar new individual ban sakta hai."
},
{
question: "6. Spirogyra mein reproduction ka simple method kaunsa hai?",
options: [
"A. Fragmentation",
"B. Budding",
"C. Multiple fission",
"D. Binary fission"
],
correct: 0,
explanation: "Mature <b>Spirogyra</b> smaller pieces mein break ho sakta hai. Ye fragments grow karke <b>new individuals</b> bana sakte hain."
},
{
question: "7. Multicellular organisms mein simple cell-by-cell division generally practical kyun nahi hoti?",
options: [
"A. Unmein specialised cells, tissues aur organs organised hote hain",
"B. Unmein DNA nahi hota",
"C. Unmein cells divide nahi karte",
"D. Unmein nucleus nahi hota"
],
correct: 0,
explanation: "Multicellular organisms mein cells <b>specialised functions</b> perform karte hain aur tissues aur organs organised form mein hote hain. Isliye random cell-by-cell division practical nahi hoti."
},
{
question: "8. Hydra aur Planaria mein body ke pieces se complete organism banne ki ability ko kya kehte hain?",
options: [
"A. Fragmentation",
"B. Regeneration",
"C. Budding",
"D. Binary fission"
],
correct: 1,
explanation: "<b>Hydra aur Planaria</b> ke body parts appropriate conditions mein grow karke complete organisms bana sakte hain. Is ability ko <b>regeneration</b> kehte hain."
},
{
question: "9. Regeneration ko reproduction ke exactly same kyun nahi mana jata?",
options: [
"A. Regeneration mein DNA nahi hota",
"B. Organisms normally cut hone par reproduce karne par depend nahi karte",
"C. Regeneration sirf plants mein hoti hai",
"D. Regeneration mein cells divide nahi karte"
],
correct: 1,
explanation: "Regeneration mein body pieces se new organisms ban sakte hain, lekin most organisms <b>normally being cut or broken up par reproduction ke liye depend nahi karte</b>. Isliye regeneration aur reproduction exactly same nahi hain."
},
{
question: "10. Hydra mein budding ke during bud kaise develop hota hai?",
options: [
"A. Body ke random pieces se",
"B. Specific site par repeated cell division se",
"C. Sirf food accumulation se",
"D. Multiple fission se"
],
correct: 1,
explanation: "Hydra mein ek <b>specific site par repeated cell division</b> ke result mein outgrowth ya <b>bud</b> develop hota hai. Bud grow karke mature hota hai aur parent body se detach hokar independent individual ban jata 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>