class 10 science chapter 6

ch6 part1

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>🧠 Control and Coordination Quiz – APICAL CLASSES</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>🧠 Control and Coordination Quiz – APICAL CLASSES</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. Living organisms mein environment ke changes ke response mein hone wali controlled movement kis cheez se related hoti hai?",
    options: [
      "A. Sirf growth",
      "B. Control and coordination",
      "C. Sirf digestion",
      "D. Excretion"
    ],
    correct: 1,
    explanation: "Living organisms environment mein hone wale changes ko <b>recognise</b> karke appropriate response dete hain. Is process ko control aur coordination systems manage karte hain."
  },
  {
    question: "2. Cat mouse ko dekhkar run karti hai. Ye movement kis type ka example hai?",
    options: [
      "A. Environment ke change ke response mein movement",
      "B. Growth ke kaaran movement",
      "C. Digestion ke kaaran movement",
      "D. Excretion ke kaaran movement"
    ],
    correct: 0,
    explanation: "Cat ne environment mein <b>mouse ko detect</b> kiya aur uske response mein run kiya. Ye growth se related movement nahi hai."
  },
  {
    question: "3. Hot object ko touch karne par hum usse quickly remove kyun karte hain?",
    options: [
      "A. Food digest karne ke liye",
      "B. Body temperature badhane ke liye",
      "C. Change ko detect karke protection ke liye response dene ke liye",
      "D. Growth increase karne ke liye"
    ],
    correct: 2,
    explanation: "Hot object se heat change detect hota hai aur nervous system appropriate movement karwata hai, jisse <b>body ko protection</b> milti hai."
  },
  {
    question: "4. Animals mein control and coordination mainly kin tissues ke through provide kiya jata hai?",
    options: [
      "A. Epithelial aur connective tissues",
      "B. Nervous aur muscular tissues",
      "C. Blood aur bone tissues",
      "D. Xylem aur phloem"
    ],
    correct: 1,
    explanation: "Animals mein <b>nervous tissue</b> information ko conduct karta hai aur <b>muscular tissue</b> response ke liye movement produce karta hai."
  },
  {
    question: "5. Environment se information detect karne wali specialised structures ko kya kaha jata hai?",
    options: [
      "A. Receptors",
      "B. Nephrons",
      "C. Alveoli",
      "D. Platelets"
    ],
    correct: 0,
    explanation: "<b>Receptors</b> environment se different information detect karte hain. Ye generally sense organs mein present hote hain."
  },
  {
    question: "6. Gustatory receptors kis cheez ko detect karte hain?",
    options: [
      "A. Smell",
      "B. Sound",
      "C. Taste",
      "D. Light"
    ],
    correct: 2,
    explanation: "<b>Gustatory receptors taste</b> ko detect karte hain, jabki olfactory receptors smell ko detect karte hain."
  },
  {
    question: "7. Olfactory receptors ka main function kya hai?",
    options: [
      "A. Taste detect karna",
      "B. Smell detect karna",
      "C. Touch detect karna",
      "D. Pressure detect karna"
    ],
    correct: 1,
    explanation: "<b>Olfactory receptors smell</b> ko detect karte hain. Ye mainly nose se associated hote hain."
  },
  {
    question: "8. Neuron mein information acquire hone ke baad electrical impulse generally kis direction mein travel karta hai?",
    options: [
      "A. Cell body → dendrite → axon",
      "B. Axon → cell body → dendrite",
      "C. Dendrite → cell body → axon",
      "D. Synapse → nucleus → dendrite"
    ],
    correct: 2,
    explanation: "Information <b>dendritic tip</b> par receive hoti hai. Electrical impulse phir <b>cell body</b> se travel karta hua <b>axon ke end</b> tak pahunchta hai."
  },
  {
    question: "9. Do neurons ke beech ke gap ko kya kaha jata hai?",
    options: [
      "A. Synapse",
      "B. Receptor",
      "C. Dendrite",
      "D. Axon"
    ],
    correct: 0,
    explanation: "Ek neuron ke axon ke end aur next neuron ke dendrite ke beech ke gap ko <b>synapse</b> kehte hain. Chemicals is gap ko cross karke next neuron mein impulse start karte hain."
  },
  {
    question: "10. Nervous tissue ka main function kya hai?",
    options: [
      "A. Food store karna",
      "B. Electrical impulses ke through information conduct karna",
      "C. Blood filter karna",
      "D. Water transport karna"
    ],
    correct: 1,
    explanation: "Nervous tissue <b>neurons ka organised network</b> hai jo electrical impulses ke through information ko body ke ek part se doosre part tak conduct 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>
    <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>

Leave a Comment