ch3 part 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Reproduction in Organisms</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 – Reproduction in Organisms</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. Vegetative propagation mein plant ke kaunse parts se new plants develop ho sakte hain?",
options: [
"A. Sirf flowers",
"B. Root, stem aur leaves",
"C. Sirf fruits",
"D. Sirf seeds"
],
correct: 1,
explanation: "Vegetative propagation mein <b>root, stem aur leaves</b> jaise vegetative parts appropriate conditions mein new plants develop kar sakte hain."
},
{
question: "2. Vegetative propagation ka use agriculture mein kin plants ko grow karne ke liye kiya jata hai?",
options: [
"A. Sugarcane, rose aur grapes",
"B. Sirf wheat",
"C. Sirf rice",
"D. Sirf maize"
],
correct: 0,
explanation: "<b>Sugarcane, roses aur grapes</b> jaise plants ko vegetative propagation ke methods, jaise <b>layering aur grafting</b>, se grow kiya ja sakta hai."
},
{
question: "3. Vegetative propagation se produced plants seeds se produced plants ke comparison mein kya advantage rakhte hain?",
options: [
"A. Flowers aur fruits earlier produce kar sakte hain",
"B. Unmein DNA nahi hota",
"C. Unhe water ki zarurat nahi hoti",
"D. Woh kabhi grow nahi karte"
],
correct: 0,
explanation: "Vegetative propagation se raised plants <b>seeds se produced plants ki comparison mein earlier flowers aur fruits</b> de sakte hain."
},
{
question: "4. Vegetative propagation kin plants ke liye especially useful hai jo seeds produce karne ki capacity lose kar chuke hain?",
options: [
"A. Banana, orange, rose aur jasmine",
"B. Wheat, rice aur maize",
"C. Mango, wheat aur rice",
"D. Pea, gram aur bean"
],
correct: 0,
explanation: "Kuch plants jaise <b>banana, orange, rose aur jasmine</b> ne seeds produce karne ki capacity lose kar di hai. Vegetative propagation in plants ko multiply karne mein useful hai."
},
{
question: "5. Vegetative propagation se produced plants parent plant ke saath generally kaise hote hain?",
options: [
"A. Genetically similar",
"B. Completely different",
"C. Hamesha weaker",
"D. Without DNA"
],
correct: 0,
explanation: "Vegetative propagation mein new plants <b>parent plant ke genetically similar</b> hote hain. Isliye parent ke important characteristics generally maintain rehte hain."
},
{
question: "6. Bryophyllum mein new plants kaise develop hote hain?",
options: [
"A. Flowers ke andar se",
"B. Leaf margins ke notches mein produced buds se",
"C. Roots ke flowers se",
"D. Fruits ke seeds se only"
],
correct: 1,
explanation: "<b>Bryophyllum ki leaf margins ke notches</b> mein small buds develop hote hain. Ye buds soil par girkar grow karte hain aur new plants bana dete hain."
},
{
question: "7. Bread mould Rhizopus mein spore-producing structures ko kya kaha jata hai?",
options: [
"A. Hyphae",
"B. Sporangia",
"C. Roots",
"D. Buds"
],
correct: 1,
explanation: "Rhizopus mein tiny <b>blob-on-a-stick structures sporangia</b> hote hain. In sporangia ke andar spores present hote hain."
},
{
question: "8. Rhizopus ke spores ki thick walls ka main advantage kya hai?",
options: [
"A. Spores ko protection provide karna",
"B. Photosynthesis karna",
"C. Food digest karna",
"D. Water ko absorb karna"
],
correct: 0,
explanation: "Spores <b>thick walls</b> se covered hote hain, jo unhe unfavourable conditions mein protect karti hain. Moist surface milne par spores germinate karke new Rhizopus individuals bana sakte hain."
},
{
question: "9. Binary fission aur multiple fission mein main difference kya hai?",
options: [
"A. Binary fission mein two daughter cells, multiple fission mein many daughter cells banti hain",
"B. Binary fission sirf plants mein hoti hai",
"C. Multiple fission mein sirf one daughter cell banti hai",
"D. Dono mein always same number of cells banti hain"
],
correct: 0,
explanation: "<b>Binary fission</b> mein ek organism divide hokar generally <b>two daughter cells</b> banata hai, jabki <b>multiple fission</b> mein ek saath <b>many daughter cells</b> produce hoti hain."
},
{
question: "10. Spores ke through reproduction organism ke liye beneficial kyun ho sakta hai?",
options: [
"A. Spores thick walls ke through protected hote hain",
"B. Spores mein DNA nahi hota",
"C. Spores water mein dissolve ho jate hain",
"D. Spores reproduction ko stop karte hain"
],
correct: 0,
explanation: "Spores ki <b>thick protective walls</b> unhe unfavourable conditions se protect karti hain. Suitable moist conditions milne par ye spores grow karke new individuals bana sakte hain."
}
];
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>