class 10 science chapter5

ch5 part1

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Life Processes 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>🧠 Life Processes 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 ko identify karne ke liye sirf visible movement ko defining characteristic kyun nahi maana ja sakta?",
options: [
"A. Sabhi living organisms move nahi karte",
"B. Sirf animals move karte hain",
"C. Plants kabhi grow nahi karte",
"D. Non-living things hamesha move karti hain"
],
correct: 0,
explanation: "✅ Correct Answer: A. Sabhi living organisms move nahi karte.<br>Ek plant visibly grow na kar raha ho tab bhi alive ho sakta hai. Kuch animals bhi bina visible movement ke breathe karte hain, jaise sleep ke time."
},

{
question: "2. Professional biologists ke according life ke liye kis type ki movement necessary hai?",
options: [
"A. Body movement",
"B. Molecular movement",
"C. Running movement",
"D. Growth movement"
],
correct: 1,
explanation: "✅ Correct Answer: B. Molecular movement.<br>Living organisms ke andar molecules continuously move karte hain. Ye molecular movement living structures ko maintain karne ke liye necessary hai."
},

{
question: "3. Viruses ke alive hone par controversy ka ek reason kya hai?",
options: [
"A. Viruses bahut large hote hain",
"B. Viruses food nahi lete",
"C. Viruses mein molecular movement nahi dikhta jab tak woh cell ko infect na karein",
"D. Viruses sirf plants mein milte hain"
],
correct: 2,
explanation: "✅ Correct Answer: C. Viruses mein molecular movement nahi dikhta jab tak woh cell ko infect na karein.<br>Viruses mein molecular movement tab tak nahi hota jab tak woh kisi cell ko infect na karein. Isi wajah se unke truly living hone par controversy hai."
},

{
question: "4. Living organisms ko apni organised structures ko maintain karne ke liye kya karna padta hai?",
options: [
"A. Sirf grow karna",
"B. Structures ko repair aur maintain karna",
"C. Sirf move karna",
"D. Environment ko control karna"
],
correct: 1,
explanation: "✅ Correct Answer: B. Structures ko repair aur maintain karna.<br>Environment ke effects se living structures ka organised nature time ke saath break down ho sakta hai. Isliye organisms ko continuously repair aur maintain karna padta hai."
},

{
question: "5. Life processes kya hain?",
options: [
"A. Sirf growth ke processes",
"B. Sirf movement ke processes",
"C. Maintenance ka kaam perform karne wale processes",
"D. Sirf reproduction ke processes"
],
correct: 2,
explanation: "✅ Correct Answer: C. Maintenance ka kaam perform karne wale processes.<br>Life processes woh processes hain jo living organism ke maintenance ka kaam karte hain. Ye processes organism ke alive rehne ke liye essential hain."
},

{
question: "6. Organism ko maintenance processes ke liye energy kahan se milti hai?",
options: [
"A. Sirf sunlight se",
"B. Outside the body se",
"C. Sirf water se",
"D. Body ke bones se"
],
correct: 1,
explanation: "✅ Correct Answer: B. Outside the body se.<br>Maintenance ke liye energy required hoti hai, aur ye energy organism ke body ke bahar ke sources se aati hai. Food energy ka important source hai."
},

{
question: "7. Food se energy aur raw materials ko body ke andar lene ki process ko kya kaha jaata hai?",
options: [
"A. Respiration",
"B. Excretion",
"C. Nutrition",
"D. Transportation"
],
correct: 2,
explanation: "✅ Correct Answer: C. Nutrition.<br>Nutrition mein organism outside se food leta hai. Food energy provide karta hai aur growth ke liye required raw materials bhi provide kar sakta hai."
},

{
question: "8. Food sources ko break down karke energy release karne ke liye organisms commonly kis gas ka use karte hain?",
options: [
"A. Nitrogen",
"B. Carbon dioxide",
"C. Hydrogen",
"D. Oxygen"
],
correct: 3,
explanation: "✅ Correct Answer: D. Oxygen.<br>Many organisms outside se oxygen acquire karte hain aur food sources ke breakdown mein use karte hain. Is process ko respiration kaha jaata hai."
},

{
question: "9. Multicellular organisms mein simple diffusion oxygen ki requirement ko completely meet kyun nahi kar sakta?",
options: [
"A. Sabhi cells directly surrounding environment ke contact mein nahi hote",
"B. Oxygen water mein dissolve nahi hoti",
"C. Cells oxygen use nahi karte",
"D. Diffusion sirf plants mein hota hai"
],
correct: 0,
explanation: "✅ Correct Answer: A. Sabhi cells directly surrounding environment ke contact mein nahi hote.<br>Multicellular organisms mein body size aur complexity increase ho jaati hai. Isliye sabhi cells surrounding environment ke direct contact mein nahi hote, aur simple diffusion sufficient nahi hota."
},

{
question: "10. Chemical reactions ke harmful ya useless waste by-products ko body se bahar remove karne ki process kya kehlaati hai?",
options: [
"A. Nutrition",
"B. Respiration",
"C. Excretion",
"D. Transportation"
],
correct: 2,
explanation: "✅ Correct Answer: C. Excretion.<br>Chemical reactions ke baad kuch waste products bante hain jo cells ke liye useless ya harmful ho sakte hain. In wastes ko body se bahar remove karne ki process excretion 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