ch6 part16
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Newton's Third Law and System of Objects Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
display: flex;
justify-content: center;
align-items: flex-start;
padding: 20px;
min-height: 100vh;
box-sizing: border-box;
}
.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: 15px 0; line-height: 1.6; }
.options label {
display: block;
margin: 8px 0;
padding: 12px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
line-height: 1.5;
}
.options label:hover { background: #f0f0f0; }
.options input { margin-right: 8px; }
.correct { background-color: #c8f7c5 !important; border-color: #28a745 !important; }
.wrong { background-color: #f8d7da !important; border-color: #dc3545 !important; }
.explanation {
background: #e9ecef;
padding: 12px;
margin-top: 10px;
border-left: 5px solid #2a5298;
line-height: 1.6;
}
.controls { text-align: center; margin-top: 20px; }
button {
background-color: #2a5298;
color: white;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
margin: 5px;
}
button:hover { background-color: #1e3c72; }
input[type="text"] {
width: 95%;
padding: 10px;
margin: 10px 0;
border: 1px solid #aaa;
border-radius: 6px;
}
#scoreboard {
margin-top: 25px;
background: #eef3f7;
padding: 15px;
border-radius: 8px;
}
#scoreboard h3 { text-align: center; }
ol { padding-left: 25px; }
hr { border: 0; border-top: 1px solid #ddd; margin: 25px 0; }
#progress { text-align: center; color: #555; margin: 10px 0; }
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Newton's Third Law and System of Objects – Quiz</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="progress"></div>
<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 Quiz</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. Earth aur ek fruit ek-doosre par equal and opposite gravitational forces lagate hain. Phir fruit Earth ki taraf noticeably kyun move karta hai, lekin Earth ka movement notice nahi hota?",
options: [
"A. Earth par gravitational force nahi lagta",
"B. Earth ka mass bahut large hai, isliye uski acceleration extremely small hoti hai",
"C. Fruit par force Earth se zyada hota hai",
"D. Earth stationary hone ke kaaran force receive nahi karti"
],
correct: 1,
explanation: "Forces equal hain, lekin a = F/m. Earth ka mass bahut bada hai, isliye same force se Earth ki acceleration bahut small hoti hai aur notice nahi hoti."
},
{
question: "2. Ek 0.1 kg bullet ko 5 kg gun se fire kiya jaata hai. Bullet par firing ke time 2 N force lagti hai. Newton’s Third Law ke according gun par recoil force kitna hoga?",
options: [
"A. 0.2 N",
"B. 2 N",
"C. 10 N",
"D. 50 N"
],
correct: 1,
explanation: "Newton’s Third Law ke according gun aur bullet ek-doosre par equal magnitude ki opposite forces lagate hain. Isliye gun par recoil force 2 N hai."
},
{
question: "3. 0.1 kg bullet par 2 N force lagti hai. Bullet ki initial acceleration kitni hogi?",
options: [
"A. 0.4 m/s²",
"B. 2 m/s²",
"C. 20 m/s²",
"D. 200 m/s²"
],
correct: 2,
explanation: "Newton’s Second Law: a = F/m = 2/0.1 = 20 m/s²."
},
{
question: "4. Usi example mein gun ka mass 5 kg hai aur recoil force 2 N hai. Gun ki initial acceleration ki magnitude kitni hogi?",
options: [
"A. 0.4 m/s²",
"B. 2 m/s²",
"C. 5 m/s²",
"D. 20 m/s²"
],
correct: 0,
explanation: "a = F/m = 2/5 = 0.4 m/s². Gun ka mass bullet se zyada hai, isliye uski acceleration smaller hai."
},
{
question: "5. Bullet aur gun par action-reaction forces equal hone ke baad bhi unki accelerations unequal kyun hoti hain?",
options: [
"A. Forces actually unequal hoti hain",
"B. Bullet aur gun ki masses different hoti hain",
"C. Gun par gravity nahi lagti",
"D. Bullet par Newton’s Second Law apply nahi hota"
],
correct: 1,
explanation: "Same force ke liye acceleration mass par depend karti hai: a = F/m. Bullet ka mass kam hai, isliye uski acceleration gun se much greater hai."
},
{
question: "6. Do boxes of masses m₁ aur m₂ ek frictionless horizontal surface par string se connected hain. Ek external force F Box 1 ko right direction mein pull karta hai. Agar dono boxes ko ek single system maana jaaye, total mass kya hoga?",
options: [
"A. m₁ − m₂",
"B. m₁/m₂",
"C. m₁ + m₂",
"D. F + m₁ + m₂"
],
correct: 2,
explanation: "System mein dono boxes aur connecting string considered hote hain. Isliye total mass m₁ + m₂ hota hai."
},
{
question: "7. Do connected boxes ka total mass (m₁ + m₂) hai aur un par frictionless surface par external force F lag raha hai. System ki acceleration ka correct expression kya hai?",
options: [
"A. a = F(m₁ + m₂)",
"B. a = (m₁ + m₂)/F",
"C. a = F/(m₁ + m₂)",
"D. a = F + m₁ + m₂"
],
correct: 2,
explanation: "Newton’s Second Law ke according acceleration = net external force / total system mass. Isliye a = F/(m₁ + m₂)."
},
{
question: "8. Do connected boxes ko ek single system treat karte waqt boxes ke beech tension T ko external force mein include kyun nahi kiya jaata?",
options: [
"A. Tension zero hoti hai",
"B. Tension ek internal force hai",
"C. Tension gravitational force hai",
"D. Tension sirf Box 1 par act karti hai"
],
correct: 1,
explanation: "Tension system ke objects ke beech act karti hai, isliye ye internal force hai. System analysis mein mainly external forces consider kiye jaate hain."
},
{
question: "9. Frictionless horizontal surface par connected two-box system par downward gravitational force aur upward normal force bhi act karte hain. Agar system vertically accelerate nahi kar raha, to in forces ka kya relation hoga?",
options: [
"A. Gravitational force normal force se greater hogi",
"B. Normal force gravitational force se greater hogi",
"C. Dono balanced hongi",
"D. Dono zero hongi"
],
correct: 2,
explanation: "System par downward gravitational force (m₁ + m₂)g aur upward normal force N₁ + N₂ act karti hai. Horizontal surface par vertical direction mein ye forces balanced hoti hain."
},
{
question: "10. Walking ke time arms aur legs ki movement complex hoti hai. Newton’s laws se overall motion ko simple way mein study karne ke liye body ko kaise consider kiya ja sakta hai?",
options: [
"A. Har body part ko completely ignore karke",
"B. Body ko ek single object/system treat karke",
"C. Sirf legs ko consider karke",
"D. Sirf arms ko consider karke"
],
correct: 1,
explanation: "Complex individual movements ke bawajood overall motion ko study karne ke liye poori body ko ek single object maana ja sakta hai. Isse analysis simpler ho jaata hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) {
alert("Please enter your name.");
return;
}
document.getElementById("nameSection").style.display = "none";
document.getElementById("quizSection").style.display = "block";
userAnswers = new Array(questions.length).fill(null);
showQuestion();
loadScoreboard();
}
function showQuestion() {
const q = questions[currentQuestion];
const container = document.getElementById("questionContainer");
document.getElementById("progress").textContent =
"Question " + (currentQuestion + 1) + " of " + questions.length;
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>
`;
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 saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}
function nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function submitQuiz() {
saveAnswer();
const unanswered = userAnswers.filter(answer => answer === null).length;
if (unanswered > 0) {
const confirmSubmit = confirm(
"You have " + unanswered + " unanswered question(s). Do you still want to submit?"
);
if (!confirmSubmit) return;
}
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
showResults();
saveScore(userName, score);
loadScoreboard();
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, char => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
})[char]);
}
function showResults() {
const container = document.getElementById("questionContainer");
container.innerHTML = "";
questions.forEach((q, index) => {
const selected = userAnswers[index];
const correct = q.correct;
const 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">
<strong>Correct Answer:</strong> ${q.options[correct]}<br><br>
<strong>Explanation:</strong> ${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("progress").style.display = "none";
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
<p>${score >= 8 ? "Excellent Work! 🎉" : score >= 5 ? "Good Attempt! Keep Practising." : "Keep Practising. You Can Improve!"}</p>
`;
}
function saveScore(name, score) {
let scores = [];
try {
scores = JSON.parse(localStorage.getItem("quizScores")) || [];
if (!Array.isArray(scores)) scores = [];
} catch (e) {
scores = [];
}
scores.push({
name: name,
score: score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = [];
try {
scores = JSON.parse(localStorage.getItem("quizScores")) || [];
if (!Array.isArray(scores)) scores = [];
} catch (e) {
scores = [];
}
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${escapeHTML(s.name)} - ${Number(s.score)}/10 (${escapeHTML(s.date)})</li>`
).join("");
}
</script>
</body>
</html>