The Essential French Revolution Quiz Class 9,Master It!

A Growing Middle Class – End to Privileges

French Revolution Quiz
` }, { question: "Arrange these events in order of their influence on French society: i. Enlightenment ideas spread through salons and coffee houses. ii. Middle class gained wealth via trade/manufacturing. iii. Louis XVI proposed new taxes, sparking protests. iv. Philosophers like Locke critiqued divine monarchy.", options: [ "iv → ii → i → iii", "ii → iv → i → iii", "iii → i → iv → ii", "i → iii → ii → iv" ], correctAnswer: 0, // Index of "iv → ii → i → iii" explanation: `
Correct Answer: A – Philosophers’ ideas (iv) → middle-class wealth (ii) → spread of ideas (i) → tax protests (iii).

Common Sense Clue: Ideas precede action; economic power enables ideological dissemination.

` }, { question: "How did Enlightenment ideas reach illiterate populations in France?", options: [ "Through public speeches by nobles", "Books/newspapers read aloud in groups", "Royal decrees translated into local dialects", "Church sermons promoting equality" ], correctAnswer: 1, // Index of "Books/newspapers read aloud in groups" explanation: `
Correct Answer: B – The text states writings were read aloud to those who couldn’t read.
Why Others Are Wrong:
  • A/C/D: Nobles and the Church opposed reforms; royal decrees increased taxes, not Enlightenment ideas.

Common Sense Clue: Oral dissemination was critical in societies with low literacy rates.

` }, { question: "What key belief united the middle class in opposing privileges based on birth?", options: [ "Divine right of kings", "Social hierarchy determined by the Church", "Merit as the basis for social position", "Absolute power of the monarchy" ], correctAnswer: 2, // Index of "Merit as the basis for social position" explanation: `
Correct Answer: C – The text states the middle class believed social position should depend on merit, not birth.
Why Others Are Wrong:
  • A/B/D: These represent traditional, pre-revolutionary systems the middle class rejected.

Common Sense Clue: Enlightenment ideals emphasized equality and individual capability over inherited status.

` }, { question: "Which activity helped spread Enlightenment ideas among illiterate populations in France?", options: [ "Royal proclamations read in churches", "Public debates in salons and coffee houses", "Nobles distributing handwritten letters", "Military campaigns promoting equality" ], correctAnswer: 1, // Index of "Public debates in salons and coffee houses" explanation: `
Correct Answer: B – The passage mentions ideas were discussed in salons/coffee-houses and read aloud to non-literates.
Why Others Are Wrong:
  • A/C/D: The monarchy and nobles opposed Enlightenment ideas; the military is not linked to spreading philosophy.

Common Sense Clue: Salons were intellectual hubs, and oral sharing was key in low-literacy societies.

` }, { question: "Which of the following were direct consequences of Louis XVI’s proposed tax increases?", options: [ "Growth of feudal privileges", "Popular anger", "Increased royal revenue", "Strengthening of the clergy's power" ], correctAnswer: 1, // Index of "Popular anger" explanation: `
Correct Answer: B – Louis XVI's tax increases directly led to popular anger and protests.
Why Others Are Wrong:
  • A: Tax increases aimed to solve the financial crisis, not grow feudal privileges.
  • C: While the goal was increased revenue, the immediate direct consequence was popular anger, which is what the question implies by "direct consequences".
  • D: The tax proposals were met with resistance from privileged classes, not a strengthening of their power.

Common Sense Clue: Unpopular taxes often lead to public unrest.

` } ];// DOM elements const container = document.getElementById('french-revolution-quiz'); const quizContent = container.querySelector('#quiz-content'); const resultsContent = container.querySelector('#results-content'); const questionTextEl = container.querySelector('#question-text'); const optionsGrid = container.querySelector('#options-grid'); const explanationContainer = container.querySelector('#explanation-container'); const explanationContent = container.querySelector('#explanation-content'); const explanationBtn = container.querySelector('#explanation-btn'); const feedbackAnimation = container.querySelector('#feedback-animation'); // Select the Lottie player directly const wrongLottiePlayer = document.getElementById('wrong-lottie-player'); const prevBtn = container.querySelector('#prev-btn'); const nextBtn = container.querySelector('#next-btn'); const restartQuizBtn = container.querySelector('#restart-quiz-btn'); const finalScoreEl = container.querySelector('#final-score'); const scoreTextEl = container.querySelector('#score-text'); const feedbackTextEl = container.querySelector('#feedback-text');// Quiz state let currentQuestionIndex = 0; let score = 0; let answered = false; let userAnswers = Array(quizData.length).fill(null); // Initialize quiz function initQuiz() { currentQuestionIndex = 0; score = 0; userAnswers = Array(quizData.length).fill(null); // Show quiz content, hide results content quizContent.style.display = 'block'; resultsContent.style.display = 'none';loadQuestion(currentQuestionIndex); } // Load question function loadQuestion(index) { const question = quizData[index]; answered = false; // Reset UI optionsGrid.innerHTML = ''; explanationContainer.classList.remove('show'); explanationBtn.classList.remove('active'); explanationBtn.innerHTML = ' Explanation'; // Reset button text // Hide and stop Lottie animation feedbackAnimation.classList.remove('show'); if (wrongLottiePlayer) { wrongLottiePlayer.stop(); }// Prepend the question number to the question text questionTextEl.textContent = `${index + 1}. ${question.question}`;question.options.forEach((option, i) => { const optionEl = document.createElement('div'); optionEl.classList.add('option'); optionEl.textContent = option; optionEl.dataset.index = i; // Store index for easy lookup optionEl.addEventListener('click', () => selectOption(optionEl, i));// If already answered, apply appropriate classes and disable if (userAnswers[index] !== null) { optionEl.classList.add('disabled'); if (Array.isArray(question.correctAnswer)) { if (question.correctAnswer.includes(i)) { optionEl.classList.add('correct'); } else if (userAnswers[index].includes(i)) { optionEl.classList.add('incorrect'); } } else { if (i === question.correctAnswer) { optionEl.classList.add('correct'); } else if (i === userAnswers[index]) { optionEl.classList.add('incorrect'); } } } optionsGrid.appendChild(optionEl); });updateNavigationButtons(); // Show explanation if already answered if (userAnswers[index] !== null) { showExplanation(); } }// Select option function selectOption(selectedOptionEl, selectedIndex) { if (answered) return; // Prevent re-answering answered = true;const question = quizData[currentQuestionIndex]; let isCorrect = false;// Handle single or multiple correct answers if (Array.isArray(question.correctAnswer)) { // For multiple correct answers, we assume a single selection for simplicity in this UI. // If the user selects one of the correct answers, it's marked correct. // For a true multiple-choice, the UI would need checkboxes and a "Submit" button. if (question.correctAnswer.includes(selectedIndex)) { isCorrect = true; } userAnswers[currentQuestionIndex] = [selectedIndex]; // Store the single selected answer } else { if (selectedIndex === question.correctAnswer) { isCorrect = true; } userAnswers[currentQuestionIndex] = selectedIndex; // Store the single selected answer }// Apply styling based on correctness if (isCorrect) { selectedOptionEl.classList.add('correct'); score++;// Get the bounding box of the question container const questionContainerRect = container.querySelector('.question-container').getBoundingClientRect();// Create a temporary canvas for confetti to confine it const confettiCanvas = document.createElement('canvas'); confettiCanvas.style.position = 'absolute'; confettiCanvas.style.top = `${questionContainerRect.top + window.scrollY}px`; confettiCanvas.style.left = `${questionContainerRect.left + window.scrollX}px`; confettiCanvas.style.width = `${questionContainerRect.width}px`; confettiCanvas.style.height = `${questionContainerRect.height}px`; confettiCanvas.style.pointerEvents = 'none'; // Allow clicks to pass through confettiCanvas.style.zIndex = '9999'; // Ensure it's on top document.body.appendChild(confettiCanvas);const myConfetti = confetti.create(confettiCanvas, { resize: true });myConfetti({ particleCount: 800, // Even denser spread: 180, // Wider spread to fill the area startVelocity: 70, // Higher initial velocity scalar: 2.2, // Even larger particles // Origin relative to the *confettiCanvas* (which is positioned over the question-container) origin: { x: 0.5, y: 0.5 }, colors: ['#FF6F61', '#6B5B95', '#88B04B', '#F7CAC9', '#92A8D1', '#FFD700', '#C06C84', '#FF9966', '#A0DAA9', '#FFD1DC', '#C6A479', '#9B2335', '#5B5EA6', '#E4D6A7'], // Highly colorful shapes: ['circle', 'square', 'star', 'line'], // More variety of shapes disableForReducedMotion: true });// Remove the confetti canvas after a delay setTimeout(() => { confettiCanvas.remove(); }, 4000); // Adjust duration as needed} else { selectedOptionEl.classList.add('incorrect'); // Show Lottie animation for wrong answer feedbackAnimation.classList.add('show'); if (wrongLottiePlayer) { wrongLottiePlayer.play(); } // Find and highlight the correct answer Array.from(optionsGrid.children).forEach((optionEl) => { if (Array.isArray(question.correctAnswer)) { if (question.correctAnswer.includes(parseInt(optionEl.dataset.index))) { optionEl.classList.add('correct'); } } else { if (parseInt(optionEl.dataset.index) === question.correctAnswer) { optionEl.classList.add('correct'); } } });// Hide Lottie after a short delay setTimeout(() => { feedbackAnimation.classList.remove('show'); if (wrongLottiePlayer) { wrongLottiePlayer.stop(); } }, 1500); // Animation duration + a little extra }// Disable all options after selection Array.from(optionsGrid.children).forEach(option => { option.classList.add('disabled'); });showExplanation(); }// Show explanation function showExplanation() { const question = quizData[currentQuestionIndex]; explanationContent.innerHTML = `

Explanation

${question.explanation}`; explanationContainer.classList.add('show'); explanationBtn.classList.add('active'); explanationBtn.innerHTML = ' Hide Explanation'; }// Toggle explanation visibility explanationBtn.addEventListener('click', () => { explanationContainer.classList.toggle('show'); if (explanationContainer.classList.contains('show')) { explanationBtn.innerHTML = ' Hide Explanation'; } else { explanationBtn.innerHTML = ' Explanation'; } });// Update navigation buttons (prev/next) function updateNavigationButtons() { prevBtn.disabled = currentQuestionIndex === 0; nextBtn.disabled = false; // Always enable next, will lead to results if last question if (currentQuestionIndex === quizData.length - 1 && answered) { nextBtn.textContent = 'View Results'; nextBtn.innerHTML = 'View Results '; } else { nextBtn.textContent = 'Next'; nextBtn.innerHTML = 'Next '; } }// Next question nextBtn.addEventListener('click', () => { if (currentQuestionIndex < quizData.length - 1) { currentQuestionIndex++; loadQuestion(currentQuestionIndex); } else if (currentQuestionIndex === quizData.length - 1) { showResults(); } });// Previous question prevBtn.addEventListener('click', () => { if (currentQuestionIndex > 0) { currentQuestionIndex--; loadQuestion(currentQuestionIndex); } });// Show results function showResults() { quizContent.style.display = 'none'; resultsContent.style.display = 'block'; finalScoreEl.textContent = `${score}/${quizData.length}`;let scorePercentage = (score / quizData.length) * 100; let scoreText = ''; let feedbackText = '';if (scorePercentage === 100) { scoreText = "Outstanding! You're a French Revolution expert!"; feedbackText = "Your knowledge is truly revolutionary!"; } else if (scorePercentage >= 75) { scoreText = "Excellent! You have a strong grasp of the French Revolution."; feedbackText = "Keep up the great work!"; } else if (scorePercentage >= 50) { scoreText = "Good effort! You're on your way to mastering the topic."; feedbackText = "Review the explanations to improve!"; } else { scoreText = "Needs more study. Don't worry, every revolution starts somewhere!"; feedbackText = "Time to delve deeper into the history books!"; }scoreTextEl.textContent = scoreText; feedbackTextEl.textContent = feedbackText; }// Restart quiz restartQuizBtn.addEventListener('click', initQuiz);// Initial load initQuiz(); });

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top