class 9 science chapter 3

ch3 part4

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plant Growth and Meristematic Tissues 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; 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;
    line-height: 1.5;
  }
  .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;
    margin-bottom: 18px;
    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; }
  #scoreboard {
    margin-top: 25px;
    background: #eef3f7;
    padding: 15px;
    border-radius: 8px;
  }
  #scoreboard h3 { text-align: center; }
  ol { padding-left: 20px; }
  #userName {
    padding: 10px;
    width: 95%;
    max-width: 350px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px;
  }
  .progress {
    text-align: center;
    color: #555;
    margin-bottom: 15px;
  }
</style>
</head>
<body>

<div class="quiz-container">
  <h2>🌱 Plant Growth and Meristematic Tissues Quiz</h2>

  <div id="nameSection">
    <p><strong>Enter your name to start:</strong></p>
    <input type="text" id="userName" placeholder="Your Name">
    <br>
    <button onclick="startQuiz()">Start Quiz</button>
  </div>

  <div id="quizSection" style="display:none;">
    <div class="progress" id="progress"></div>
    <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. Dicot plants mein stem ki length ke saath-saath diameter ya girth bhi increase hoti hai. Stem ki girth increase hone ka main reason kya hai?",
    options: [
      "A. Dead cells ka accumulation",
      "B. Ring mein arranged actively dividing cells ki activity",
      "C. Leaves ka photosynthesis",
      "D. Root hairs ka growth"
    ],
    correct: 1,
    explanation: "Stem mein actively dividing cells ring ke form mein arranged hoti hain. Ye new cells produce karke stem ka diameter increase karti hain."
  },
  {
    question: "2. Tree trunk ke cut surface par jo ring-like patterns dikhai dete hain, unhe kya kaha jata hai?",
    options: [
      "A. Growth hairs",
      "B. Vascular bundles",
      "C. Annual growth rings",
      "D. Root rings"
    ],
    correct: 2,
    explanation: "Tree trunk ke cut surface par present ring-like patterns ko annual growth rings kaha jata hai. Inki width different growth conditions ko reflect kar sakti hai."
  },
  {
    question: "3. Scientists annual growth rings ko count karke tree ke baare mein kya estimate kar sakte hain?",
    options: [
      "A. Tree ki height only",
      "B. Tree ki age aur past growth conditions",
      "C. Leaves ki number only",
      "D. Root ki depth only"
    ],
    correct: 1,
    explanation: "Annual rings count karke scientists tree ki age estimate kar sakte hain aur uske growth ke dauran favourable ya unfavourable climatic conditions ko samajh sakte hain."
  },
  {
    question: "4. Stem ke circumference ke along present meristematic tissue jo stem ki girth increase karta hai, use kya kehte hain?",
    options: [
      "A. Apical meristem",
      "B. Intercalary meristem",
      "C. Lateral meristem",
      "D. Permanent tissue"
    ],
    correct: 2,
    explanation: "Lateral meristem stem ke circumference ke along present hota hai aur actively dividing cells produce karke stem ki girth/diameter increase karta hai."
  },
  {
    question: "5. Agar young stem ka tip cut kar diya jaye, to generally kya hota hai?",
    options: [
      "A. Stem ki lengthwise growth stop ho jaati hai aur new branches nodes se arise hoti hain",
      "B. Stem ki length suddenly double ho jaati hai",
      "C. Roots ki growth completely stop ho jaati hai",
      "D. Plant mein saare nodes disappear ho jaate hain"
    ],
    correct: 0,
    explanation: "Stem tip cut hone ke baad length mein growth ruk jaati hai, lekin nodes se new branches develop ho sakti hain."
  },
  {
    question: "6. Stem par jis point se branches ya leaves arise hoti hain, us point ko kya kaha jata hai?",
    options: [
      "A. Internode",
      "B. Node",
      "C. Root tip",
      "D. Girth"
    ],
    correct: 1,
    explanation: "Stem ka woh point jahan se branches ya leaves arise hoti hain, node kehlata hai."
  },
  {
    question: "7. Do consecutive nodes ke beech stem ke part ko kya kaha jata hai?",
    options: [
      "A. Node",
      "B. Internode",
      "C. Apical region",
      "D. Lateral ring"
    ],
    correct: 1,
    explanation: "Stem mein do nodes ke beech ka portion internode kehlata hai."
  },
  {
    question: "8. Garden hedge ko cut karne ke kuch time baad usmein zyada branches aa jaati hain aur hedge bushy ho jata hai. Is regrowth mein kaunsa meristem responsible hai?",
    options: [
      "A. Apical meristem",
      "B. Lateral meristem",
      "C. Intercalary meristem",
      "D. Permanent tissue"
    ],
    correct: 2,
    explanation: "Intercalary meristem nodes ke paas present hota hai aur cutting ke baad new branches/regrowth mein help karta hai."
  },
  {
    question: "9. Niche diye gaye options mein meristematic tissues aur unke functions ka correct combination kaunsa hai?",
    options: [
      "A. Apical—girth, Lateral—length, Intercalary—storage",
      "B. Apical—length, Lateral—girth, Intercalary—regeneration after cutting",
      "C. Apical—storage, Lateral—food transport, Intercalary—photosynthesis",
      "D. Apical—food transport, Lateral—length, Intercalary—girth"
    ],
    correct: 1,
    explanation: "Apical meristem length increase karta hai, lateral meristem girth increase karta hai, aur intercalary meristem cutting ke baad regeneration mein help karta hai."
  },
  {
    question: "10. Meristematic cells mein vacuoles generally absent kyun hote hain?",
    options: [
      "A. Kyunki cells continuously divide karti hain aur unhe dense cytoplasm aur active cell division ke liye specialised structure chahiye",
      "B. Kyunki vacuoles sirf animal cells mein hote hain",
      "C. Kyunki vacuoles photosynthesis karte hain",
      "D. Kyunki vacuoles cell wall banate hain"
    ],
    correct: 0,
    explanation: "Meristematic cells continuously divide karti hain. Inmein dense cytoplasm, prominent nucleus aur many organelles hote hain; vacuoles generally absent hote hain, jo rapid cell division ke liye suitable arrangement 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";

  userAnswers = new Array(questions.length).fill(null);
  showQuestion();
  loadScoreboard();
}

function showQuestion() {
  const q = questions[currentQuestion];
  const container = document.getElementById("questionContainer");

  document.getElementById("progress").textContent =
    "Question " + (currentQuestion + 1) + " of " + questions.length;

  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 saveAnswer() {
  const selected = document.querySelector('input[name="option"]:checked');
  userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}

function nextQuestion() {
  saveAnswer();

  if (currentQuestion < questions.length - 1) {
    currentQuestion++;
    showQuestion();
  }
}

function prevQuestion() {
  saveAnswer();

  if (currentQuestion > 0) {
    currentQuestion--;
    showQuestion();
  }
}

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";
  document.getElementById("progress").style.display = "none";

  document.getElementById("result").innerHTML = `
    <h3>Your Score: ${score} / ${questions.length}</h3>
    <p>${userName}, ${score === questions.length ? "Excellent! Perfect score!" : "Keep practising and improve your score!"}</p>
    <button onclick="location.reload()">Try Again</button>
  `;
}

function saveScore(name, score) {
  let scores = JSON.parse(localStorage.getItem("quizScores")) || [];

  scores.push({
    name: name,
    score: 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>

Leave a Comment