Elementor #31704

<!DOCTYPE html>

<html lang=”en”>

<head>

  <meta charset=”UTF-8″>

  <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>

  <title>TOEIC Grammar Practice</title>

  <style>

    body {

      font-family: Arial, sans-serif;

      margin: 20px;

      line-height: 1.6;

    }

    .question-container {

      margin-bottom: 20px;

    }

    .feedback {

      color: red;

      font-weight: bold;

    }

  </style>

</head>

<body>

  <h1>TOEIC Grammar Practice</h1>

  <div id=”questions-container”></div>

  <button id=”submit-btn”>Submit Answers</button>

  <div id=”result”></div>

  <script>

    const questions = [

      { question: “The new policy is designed to improve the _______ of employees.”, options: [“motivate”, “motivation”, “motivated”, “motivating”], correct: “motivation”, topic: “Word Forms” },

      { question: “The director gave a very _______ presentation during the annual meeting.”, options: [“impressed”, “impressing”, “impressive”, “impress”], correct: “impressive”, topic: “Word Forms” },

      { question: “The children felt _______ by the magician’s incredible tricks.”, options: [“impress”, “impressing”, “impressed”, “impressive”], correct: “impressed”, topic: “Word Forms” },

      { question: “It is essential that the manager knows _______ the reports will be submitted.”, options: [“when”, “where”, “who”, “which”], correct: “when”, topic: “Relative Pronouns” },

      { question: “We need to confirm _______ the project deadline can be extended.”, options: [“where”, “what”, “whether”, “which”], correct: “whether”, topic: “Relative Pronouns” },

      { question: “The product _______ was launched last year has become a bestseller.”, options: [“what”, “which”, “who”, “where”], correct: “which”, topic: “Relative Pronouns” },

      { question: “The company has a policy _______ ensures all employees receive annual training.”, options: [“that”, “what”, “who”, “when”], correct: “that”, topic: “Relative Pronouns” },

      { question: “This is the most delicious cake ______ I have ever tasted.”, options: [“which”, “what”, “where”, “that”], correct: “that”, topic: “Relative Pronouns” },

      { question: “The CEO _______ the quarterly results during yesterday’s meeting.”, options: [“reviews”, “reviewed”, “will review”, “reviewing”], correct: “reviewed”, topic: “Tenses” },

      { question: “They _______ a new marketing strategy when the CEO came in.”, options: [“develop”, “develops”, “developed”, “was developing”], correct: “was developing”, topic: “Tenses” },

      { question: “The team _______ three proposals for the new project so far.”, options: [“prepares”, “prepared”, “have prepared”, “has prepared”], correct: “has prepared”, topic: “Tenses” },

      { question: “Our company _______ several awards for its innovative products in recent years.”, options: [“wins”, “won”, “has won”, “winning”], correct: “has won”, topic: “Tenses” },

      { question: “We decided to hire additional staff _______ the workload increased significantly.”, options: [“because”, “but”, “although”, “due to”], correct: “because”, topic: “Conjunctions” },

      { question: “We decided to hire additional staff _______ the increased workload.”, options: [“because”, “but”, “although”, “due to”], correct: “due to”, topic: “Conjunctions” },

      { question: “The project will not proceed _______ the client approves the proposal.”, options: [“if”, “unless”, “because”, “although”], correct: “unless”, topic: “Conjunctions” },

      { question: “_____ the keynote speaker took the stage, the audience had already filled the hall.”, options: [“Before”, “Until”, “Whereas”, “Then”], correct: “Before”, topic: “Conjunctions” },

      { question: “The sprinklers for the lawn’s irrigation system are _____ controlled.”, options: [“mechanically”, “mechanic”, “mechanism”, “mechanical”], correct: “mechanically”, topic: “Adverbs” },

      { question: “He is excited about the new promotion and looking forward to _____ more responsibilities.”, options: [“taking on”, “take on”, “getting up”, “taking in”], correct: “taking on”, topic: “Phrasal Verbs” },

      { question: “The team is looking forward to _____ their new office next month.”, options: [“moving into”, “move into”, “moved into”, “moves into”], correct: “moving into”, topic: “Phrasal Verbs” },

      { question: “While the machine _____, the workers waited in the lounge.”, options: [“was repaired”, “was being repaired”, “repairs”, “repaired”], correct: “was being repaired”, topic: “Passive Voice” }

    ];

 

    const container = document.getElementById(“questions-container”);

 

    questions.forEach((q, index) => {

      const questionDiv = document.createElement(“div”);

      questionDiv.className = “question-container”;

      questionDiv.innerHTML = `

        <p><strong>Q${index + 1}:</strong> ${q.question}</p>

        ${q.options

          .map(

            (option, i) =>

              `<label><input type=”radio” name=”q${index}” value=”${option}”> ${option}</label><br>`

          )

          .join(“”)}

      `;

      container.appendChild(questionDiv);

    });

 

    document.getElementById(“submit-btn”).addEventListener(“click”, () => {

      let correctCount = 0;

      const feedback = {};

 

      questions.forEach((q, index) => {

        const selectedOption = document.querySelector(`input[name=”q${index}”]:checked`);

        if (selectedOption) {

          if (selectedOption.value === q.correct) {

            correctCount++;

          } else {

            if (!feedback[q.topic]) {

              feedback[q.topic] = 0;

            }

            feedback[q.topic]++;

          }

        }

      });

 

      const resultDiv = document.getElementById(“result”);

      resultDiv.innerHTML = `

        <p>You answered ${correctCount} out of ${questions.length} correctly.</p>

        <h3>Feedback:</h3>

        <ul>

          ${Object.entries(feedback)

            .map(([topic, count]) => `<li>${topic}: ${count} mistakes</li>`)

            .join(“”)}

        </ul>

      `;

    });

  </script>

</body>

</html>

訂閱電子報,立即領取第一份學習筆記!

訂閱電子報