From dd286e7d8a6b9313a199a6010a3131c07c344e87 Mon Sep 17 00:00:00 2001 From: Pratik Mali Date: Mon, 13 May 2024 14:19:47 +0530 Subject: [PATCH] added solutions to quiz --- Pages/Quizes/tests/button-1/solution.js | 33 ++- Pages/Quizes/tests/button-1/solutions.html | 13 +- Pages/Quizes/tests/button-2/solution.html | 13 +- Pages/Quizes/tests/button-2/solution.js | 234 ++++++++++---------- Pages/Quizes/tests/button-3/solution.html | 12 +- Pages/Quizes/tests/button-3/solution.js | 233 ++++++++++---------- Pages/Quizes/tests/button-4/solution.html | 12 +- Pages/Quizes/tests/button-4/solution.js | 234 ++++++++++---------- Pages/Quizes/tests/button-5/solution.html | 13 +- Pages/Quizes/tests/button-5/solution.js | 235 ++++++++++---------- Pages/Quizes/tests/button-6/solution.html | 12 +- Pages/Quizes/tests/button-6/solution.js | 235 ++++++++++---------- Pages/Quizes/tests/button-7/solution.html | 12 +- Pages/Quizes/tests/button-7/solution.js | 240 +++++++++++---------- Pages/Quizes/tests/button-8/solution.html | 12 +- Pages/Quizes/tests/button-8/solution.js | 234 ++++++++++---------- Pages/Quizes/tests/button-9/script.js | 4 +- Pages/Quizes/tests/button-9/solution.html | 139 ++++++++++++ Pages/Quizes/tests/button-9/solution.js | 172 +++++++++++++++ 19 files changed, 1279 insertions(+), 813 deletions(-) create mode 100644 Pages/Quizes/tests/button-9/solution.html create mode 100644 Pages/Quizes/tests/button-9/solution.js diff --git a/Pages/Quizes/tests/button-1/solution.js b/Pages/Quizes/tests/button-1/solution.js index 033ee64f9..63fb9867f 100644 --- a/Pages/Quizes/tests/button-1/solution.js +++ b/Pages/Quizes/tests/button-1/solution.js @@ -7,6 +7,7 @@ const quizData = [ c: "F < O < Cl", d: "Cl < O < F", correct: "b", + explanation: "Electron affinity is the energy released when an electron is added to a neutral atom to form a negative ion. Among oxygen (O), fluorine (F), and chlorine (Cl), fluorine has the highest electron affinity due to its smaller atomic size and higher effective nuclear charge. Thus, the correct order is O < F < Cl.", topic: "Electron Affinity", difficulty: "Easy", }, @@ -18,10 +19,10 @@ const quizData = [ c: "Pyrophosphate", d: "Phosphite", correct: "a", + explanation: "The formation of a yellow precipitate upon the addition of aqueous silver nitrate indicates the presence of chloride ions. Orthophosphate ions (PO₄³⁻) do not react with silver nitrate, whereas chloride ions (Cl⁻) do, forming a yellow precipitate of silver chloride (AgCl).", topic: "Group 11", difficulty: "Hard", }, - { question: "How many S-S bonds are there in tetrathionate ion ?", a: "2", @@ -29,6 +30,7 @@ const quizData = [ c: "4", d: "5", correct: "c", + explanation: "The tetrathionate ion (S₄O₆²⁻) consists of four sulfur atoms bonded to each other with three S-S bonds and two S=O bonds. Therefore, the number of S-S bonds in the tetrathionate ion is 3.", topic: "Molecular Structure", difficulty: "Hard", }, @@ -39,6 +41,7 @@ const quizData = [ c: "Oxygen", d: "Hydrogen", correct: "c", + explanation: "When ozone (O₃) reacts with hydrogen sulfide (H₂S), oxygen gas (O₂) is released. The reaction can be represented as follows: O₃ + H₂S -> O₂ + H₂O.", topic: "Group 1", difficulty: "Medium", }, @@ -49,6 +52,7 @@ const quizData = [ c: "Si", d: "Sn", correct: "c", + explanation: "Boron shows a diagonal relationship with silicon (Si). Diagonal relationships occur between elements in different periods that have similar properties, despite being in different groups. Boron and silicon have similar properties due to their comparable sizes and similar electronegativities.", topic: "Diagonal Relationship", difficulty: "Easy", }, @@ -59,6 +63,7 @@ const quizData = [ c: "sulphur", d: "zinc", correct: "b", + explanation: "Catenation is the ability of an element to form bonds with itself to form chains or rings. Carbon (C) exhibits the maximum catenation property among the given options. This is due to its ability to form strong covalent bonds with other carbon atoms, leading to the formation of long chains and complex structures.", topic: "Catenation", difficulty: "Easy", }, @@ -69,6 +74,7 @@ const quizData = [ c: "Si", d: "Sn", correct: "c", + explanation: "Boron shows a diagonal relationship with silicon (Si). Diagonal relationships occur between elements in different periods that have similar properties, despite being in different groups. Boron and silicon have similar properties due to their comparable sizes and similar electronegativities.", topic: "Chemical Composition", difficulty: "Medium", }, @@ -79,6 +85,7 @@ const quizData = [ c: "3", d: "4", correct: "c", + explanation: "Cyclic metaphosphoric acid (HPO₃)ₙ does not have any P-O-P bonds because it consists of cyclic phosphate units linked by P-O-H bonds. Therefore, the correct answer is 0.", topic: "Chemical Bonding", difficulty: "Medium", }, @@ -90,6 +97,7 @@ const quizData = [ c: "Nitrogen dioxide", d: "Dinitrogen tetroxide", correct: "b", + explanation: "On heating ammonium nitrate (NH₄NO₃) at 250°C, nitrous oxide (N₂O) is released. The decomposition of ammonium nitrate at this temperature yields nitrous oxide, water, and dinitrogen monoxide.", topic: "Nitrogen Oxides", difficulty: "Easy", }, @@ -100,11 +108,13 @@ const quizData = [ c: "sp3d3", d: "sp3", correct: "b", + explanation: "The hybridization of sulfur in sulfur hexafluoride (SF₆) is sp³d². In SF₆, sulfur forms six σ bonds with the fluorine atoms, and its electron configuration involves one 3s, three 3p, and two 3d orbitals.", topic: "Hybridization", difficulty: "Hard", }, ]; + const quiz = document.getElementById("quiz"); const answerElements = document.querySelectorAll(".answer"); const questionElement = document.getElementById("question"); @@ -123,15 +133,20 @@ const deselectAnswers = () => { answerElements.forEach((answer) => (answer.checked=false)); }; +const explanationElement = document.getElementById("explanation"); + const loadQuiz = () => { - deselectAnswers(); - const currentQuizData = quizData[currentQuiz]; - questionElement.innerText = currentQuizData.question; - a_text.innerText = currentQuizData.a; - b_text.innerText = currentQuizData.b; - c_text.innerText = currentQuizData.c; - d_text.innerText = currentQuizData.d; - difficulty.innerText = currentQuizData.difficulty; + deselectAnswers(); + const currentQuizData = quizData[currentQuiz]; + questionElement.innerText = currentQuizData.question; + a_text.innerText = currentQuizData.a; + b_text.innerText = currentQuizData.b; + c_text.innerText = currentQuizData.c; + d_text.innerText = currentQuizData.d; + difficulty.innerText = currentQuizData.difficulty; + + // Update explanation text + explanationElement.innerText = currentQuizData.explanation; }; loadQuiz(); diff --git a/Pages/Quizes/tests/button-1/solutions.html b/Pages/Quizes/tests/button-1/solutions.html index af3efcd10..b63444737 100644 --- a/Pages/Quizes/tests/button-1/solutions.html +++ b/Pages/Quizes/tests/button-1/solutions.html @@ -54,19 +54,19 @@

Question is loading...