Revision 2

English Literature Quiz body { font-family: Arial, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; background-color: #f5f5f5; } .container { background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .question { margin-bottom: 20px; padding: 15px; border: 1px solid #ddd; border-radius: 4px; display: none; } .option { margin: 10px 0; padding: 10px; background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; } .option:hover { background-color: #e9ecef; } .result { display: none; margin-top: 20px; } .name-section { margin-bottom: 20px; } input[type="text"] { padding: 8px; margin: 10px 0; width: 200px; } button { padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; } button:hover { background-color: #0056b3; } .correct { background-color: #d4edda; color: #155724; } .incorrect { background-color: #f8d7da; color: #721c24; } English Literature Quiz Enter your name:
Start Quiz

1. When was Geoffrey Chaucer born?

a) 1330-1335 b) 1340-1345 c) 1350-1355 d) 1360-1365

2. Who called Chaucer the ‘Father of English Poetry’?

a) Matthew Arnold b) Edmund Spenser c) John Dryden d) G.K. Chesterton

3. In which work did Chaucer first use the Heroic Couplet?

a) The Canterbury Tales b) The House of Fame c) Troilus and Cressida d) The Legend of Good Women

4. How many stories were originally planned for The Canterbury Tales?

a) 100 b) 110 c) 120 d) 130

5. Which tale is considered the longest in The Canterbury Tales?

a) The Miller’s Tale b) The Knight’s Tale c) The Pardoner’s Tale d) The Wife of Bath’s Tale

6. Where was Chaucer first buried?

a) St. Paul’s Cathedral b) Westminster Abbey c) Canterbury Cathedral d) York Minster

7. What position did Chaucer hold in 1374?

a) Knight of the Shire b) King’s Works Overseer c) Comptroller of London Customs d) Royal Messenger

8. How many pilgrims are described in the General Prologue of The Canterbury Tales?

a) 25 b) 26 c) 27 d) 28

9. What verse form did Chaucer first use in The Book of the Duchess?

a) Heroic Couplet b) Ottava Rima c) Rhyme Royal d) Blank Verse

10. Which of these characters is NOT criticized or satirized by Chaucer in The Canterbury Tales?

a) The Miller b) The Merchant c) The Parson d) The Friar Quiz Results

let currentQuestion = 1; let score = 0; let userAnswers = {}; const correctAnswers = { 1: 1, // 1340-1345 2: 2, // John Dryden 3: 3, // The Legend of Good Women 4: 2, // 120 5: 1, // The Knight's Tale 6: 1, // Westminster Abbey 7: 2, // Comptroller of London Customs 8: 2, // 27 9: 1, // Ottava Rima 10: 2 // The Parson }; function startQuiz() { const name = document.getElementById('userName').value; if (!name) { alert('Please enter your name to start the quiz'); return; } document.getElementById('nameSection').style.display = 'none'; document.getElementById('quizSection').style.display = 'block'; document.getElementById('q1').style.display = 'block'; } function selectOption(option, questionNumber) { userAnswers[questionNumber] = option; if (questionNumber < 10) { document.getElementById('q' + questionNumber).style.display = 'none'; document.getElementById('q' + (questionNumber + 1)).style.display = 'block'; } else { showResults(); } } function showResults() { document.getElementById('quizSection').style.display = 'none'; document.getElementById('resultSection').style.display = 'block'; const name = document.getElementById('userName').value; score = calculateScore(); document.getElementById('userName-result').textContent = `Name: ${name}`; document.getElementById('score').textContent = `Score: ${score} out of 10`; showDetailedAnswers(); } function calculateScore() { let score = 0; for (let question in userAnswers) { if (userAnswers[question] === correctAnswers[question]) { score++; } } return score; } function showDetailedAnswers() { const answersDiv = document.getElementById('answers'); answersDiv.innerHTML = '<h3>Detailed Answers:</h3>'; const questions = document.querySelectorAll('.question'); questions.forEach((question, index) => { const questionNumber = index + 1; const questionText = question.querySelector('p').textContent; const options = question.querySelectorAll('.option'); const userAnswer = userAnswers[questionNumber]; const correctAnswer = correctAnswers[questionNumber]; const isCorrect = userAnswer === correctAnswer; const resultClass = isCorrect ? 'correct' : 'incorrect'; const answerHTML = ` <div class="${resultClass}" style="margin: 10px 0; padding: 10px;"> <p><strong>${questionText}</strong></p> <p>Your answer: ${options[userAnswer].textContent}</p> <p>Correct answer: ${options[correctAnswer].textContent}</p> </div> `; answersDiv.innerHTML += answerHTML; }); }

The post Revision 2 first appeared on Ronald Hadrian.

 •  0 comments  •  flag
Share on Twitter
Published on December 17, 2024 05:23
No comments have been added yet.