ch3 part5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Permanent Tissues and Epidermis</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;
line-height: 1.6;
}
.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;
line-height: 1.6;
}
.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; }
input[type="text"] {
padding: 10px;
width: 60%;
max-width: 300px;
border: 1px solid #ccc;
border-radius: 6px;
}
#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 – Permanent Tissues and Epidermis</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. Sunflower stem ke transverse section (T.S.) ko microscope ke under observe karne par different groups of cells dikhte hain. In different groups of cells ko kya kaha jata hai?",
options: [
"A. Permanent tissues",
"B. Meristematic tissues only",
"C. Reproductive organs",
"D. Root hairs"
],
correct: 0,
explanation: "Different groups of cells specific functions ke liye specialised hote hain. Aise tissues ko permanent tissues kaha jata hai."
},
{
question: "2. Permanent tissues ko unki cellular composition ke basis par kaise classify kiya jata hai?",
options: [
"A. Small aur large tissues",
"B. Simple aur complex tissues",
"C. Root aur shoot tissues",
"D. Living aur dead organs"
],
correct: 1,
explanation: "Simple permanent tissue mein sirf ek type ki cells hoti hain, jabki complex permanent tissue mein ek se zyada types ki cells hoti hain."
},
{
question: "3. Plant body ki outermost layer kaunsi hoti hai jo plant ke different parts ko protect karti hai?",
options: [
"A. Xylem",
"B. Phloem",
"C. Epidermis",
"D. Meristem"
],
correct: 2,
explanation: "Epidermis plant body ki outermost layer hoti hai aur plant ke parts ko protection provide karti hai."
},
{
question: "4. Epidermal cells generally kis type ki arrangement mein hoti hain?",
options: [
"A. Loosely arranged, multi-layered cells",
"B. Tightly packed, single layer of flat and rectangular cells",
"C. Circular cells with large spaces",
"D. Randomly arranged dead cells"
],
correct: 1,
explanation: "Epidermis generally single layer ki hoti hai aur iski flat, rectangular cells tightly packed hoti hain."
},
{
question: "5. Epidermal cells ke upar present waxy layer ko kya kaha jata hai?",
options: [
"A. Cutin",
"B. Cellulose",
"C. Starch",
"D. Chlorophyll"
],
correct: 0,
explanation: "Epidermal cells ke upar cutin ki waxy layer, jise cuticle kaha jata hai, present hoti hai. Ye water loss aur mechanical injury se protection mein help karti hai."
},
{
question: "6. Very dry habitat mein rehne wale plants ki epidermis par thick cuticle ka main advantage kya hai?",
options: [
"A. Photosynthesis ko completely stop karna",
"B. Transpiration ke through water loss ko reduce karna",
"C. Roots ko remove karna",
"D. Food transport ko stop karna"
],
correct: 1,
explanation: "Dry habitats ke plants mein thick cuticle transpiration ke through hone wale water loss ko reduce karne mein help karti hai."
},
{
question: "7. Roots par epidermal cells se hair-like projections arise hoti hain. Inhe kya kaha jata hai aur inka main function kya hai?",
options: [
"A. Stomata — gaseous exchange",
"B. Root hairs — water aur minerals absorption",
"C. Cuticle — food storage",
"D. Guard cells — mechanical support"
],
correct: 1,
explanation: "Roots mein hair-like projections ko root hairs kehte hain. Ye surface area increase karke soil se water aur minerals absorption mein help karte hain."
},
{
question: "8. Leaves ki epidermis mein present small pores ko kya kaha jata hai?",
options: [
"A. Root hairs",
"B. Stomata",
"C. Annual rings",
"D. Vessels"
],
correct: 1,
explanation: "Leaf epidermis mein present pores ko stomata kaha jata hai. Ye gaseous exchange aur transpiration mein important role play karte hain."
},
{
question: "9. Stomata se water vapour ke evaporation ko kya kaha jata hai?",
options: [
"A. Respiration",
"B. Diffusion",
"C. Transpiration",
"D. Photosynthesis"
],
correct: 2,
explanation: "Stomata ke through water vapours ka evaporation transpiration kehlata hai. Transpiration xylem mein transpiration pull create karke water transport mein help karti hai."
},
{
question: "10. Transpiration plant mein water transportation ko kaise help karti hai?",
options: [
"A. Stomata food ko directly roots tak bhejte hain",
"B. Transpiration xylem mein transpiration pull create karti hai",
"C. Epidermis water ko destroy karti hai",
"D. Root hairs transpiration ko completely stop karte hain"
],
correct: 1,
explanation: "Leaves se water vapour loss hone par transpiration pull generate hota hai, jo xylem mein water transportation ko support karta 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>
`;
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;">
<strong>Explanation:</strong> ${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
const percentage = (score / questions.length) * 100;
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
<h3>Percentage: ${percentage}%</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>${escapeHTML(s.name)} - ${s.score}/10 (${escapeHTML(s.date)})</li>`
).join('');
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, function(char) {
return {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}[char];
});
}
</script>
</body>
</html>