ch6 part10
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APICAL CLASSES - Newton's Second Law and Momentum 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: 30px;
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: 10px 0;
line-height: 1.6;
}
.options label {
display: block;
margin: 8px 0;
padding: 10px;
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: 10px;
margin-top: 10px;
border-left: 5px solid #2a5298;
display: none;
line-height: 1.6;
}
.controls {
text-align: center;
margin-top: 15px;
}
button {
background-color: #2a5298;
color: white;
border: none;
padding: 10px 20px;
border-radius: 6px;
cursor: pointer;
margin: 5px;
}
button:hover {
background-color: #1e3c72;
}
#scoreboard {
margin-top: 25px;
background: #eef3f7;
padding: 15px;
border-radius: 8px;
}
#scoreboard h3 {
text-align: center;
}
ol {
padding-left: 20px;
}
#result {
color: #1e3c72;
}
@media (max-width: 600px) {
body {
padding: 10px;
}
.quiz-container {
width: 100%;
padding: 15px;
}
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>đź§ APICAL CLASSES<br>Newton's Second Law of Motion and Momentum 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="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</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. Activity 6.3 mein force ko theoretically double karne par acceleration ideally kya honi chahiye?",
options: ["A. Half", "B. Same", "C. Double", "D. Zero"],
correct: 2,
explanation: "Same mass ke liye Newton’s second law ke according acceleration force ke directly proportional hoti hai. Isliye force double hone par acceleration ideally double honi chahiye."
},
{
question: "2. Activity 6.4 mein cart ka mass double karne par, same force ke liye theoretical acceleration kya hogi?",
options: ["A. Double", "B. Half", "C. Four times", "D. Same"],
correct: 1,
explanation: "Same force ke liye acceleration mass ke inversely proportional hoti hai. Isliye mass double hone par acceleration theoretically half ho jaati hai."
},
{
question: "3. Activities mein theoretical value se acceleration thodi different kyun mil sakti hai?",
options: [
"A. Gravity completely disappear ho jaati hai",
"B. Measurement errors aur friction ke kaaran",
"C. Mass suddenly zero ho jaata hai",
"D. Velocity hamesha constant hoti hai"
],
correct: 1,
explanation: "Practical experiment mein measurement errors aur cart ke wheels aur surface ke beech friction ideal result se difference create kar sakte hain."
},
{
question: "4. Momentum ko kaise define kiya jaata hai?",
options: [
"A. Mass Ă· velocity",
"B. Mass + velocity",
"C. Mass Ă— velocity",
"D. Velocity Ă· mass"
],
correct: 2,
explanation: "Momentum object ke mass aur velocity ka product hota hai. Isliye p = mv."
},
{
question: "5. Kisi object ke momentum ki direction kis direction mein hoti hai?",
options: [
"A. Mass ki direction mein",
"B. Velocity ki direction mein",
"C. Acceleration ke opposite",
"D. Hamesha downward"
],
correct: 1,
explanation: "Momentum ek vector quantity hai aur uski direction velocity ki direction same hoti hai."
},
{
question: "6. Newton’s second law ke complete form ke according, rate of change of momentum kis ke proportional hota hai?",
options: [
"A. Object ke mass ke",
"B. Object ki speed ke",
"C. Net force ke",
"D. Object ke volume ke"
],
correct: 2,
explanation: "Newton’s second law ke according momentum ke change ki rate net force ke proportional hoti hai aur change net force ki direction mein hota hai."
},
{
question: "7. Cricket fielder fast-moving ball catch karte waqt apne hands ko ball ke saath gradually backward kyun le jaata hai?",
options: [
"A. Ball ki speed increase karne ke liye",
"B. Ball ko zyada distance tak le jaane ke liye",
"C. Ball ko stop karne ka time increase karne ke liye",
"D. Ball ka mass decrease karne ke liye"
],
correct: 2,
explanation: "Hands ko backward move karne se ball ko stop hone mein zyada time milta hai. Isse acceleration ka magnitude aur required force dono kam hote hain."
},
{
question: "8. Fielder ke hands ko backward move karne se ball par required force kyun kam hota hai?",
options: [
"A. Stopping time increase hone se acceleration kam hoti hai",
"B. Ball ka mass kam ho jaata hai",
"C. Gravity zero ho jaati hai",
"D. Momentum instantly zero ho jaata hai"
],
correct: 0,
explanation: "Same change in velocity ko longer time mein karne par acceleration smaller hoti hai. Newton’s second law ke according smaller acceleration ka matlab smaller force hai."
},
{
question: "9. Vehicles mein airbags passenger ko serious injury se bachane mein kaise help karte hain?",
options: [
"A. Collision ke time passenger ka mass kam kar dete hain",
"B. Impact ka time increase karke acceleration aur force reduce karte hain",
"C. Vehicle ki speed automatically increase kar dete hain",
"D. Passenger ko vehicle se bahar push kar dete hain"
],
correct: 1,
explanation: "Airbag soft cushion provide karta hai aur hitting ka time increase karta hai. Isse acceleration aur person par exerted force reduce hota hai, injury ka risk kam hota hai."
},
{
question: "10. Fresh coconut ko hard surface par high velocity se hit karne par shell crack kyun ho sakta hai?",
options: [
"A. Coconut ki velocity bahut slowly change hoti hai",
"B. Coconut ko stop hone mein bahut long time lagta hai",
"C. Coconut ki velocity very short time mein zero hoti hai, jisse large force act karta hai",
"D. Coconut ka mass impact ke time zero ho jaata hai"
],
correct: 2,
explanation: "Coconut high velocity se aakar very short time mein stop hota hai. Velocity ka rapid change large acceleration/deceleration produce karta hai, isliye ground coconut par large force lagata hai aur shell crack ho sakta hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
let quizSubmitted = false;
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";
showQuestion();
loadScoreboard();
}
function showQuestion() {
const q = questions[currentQuestion];
const container = document.getElementById("questionContainer");
container.innerHTML = `
<p><strong>Question ${currentQuestion + 1} of ${questions.length}</strong></p>
<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() {
if (quizSubmitted) return;
saveAnswer();
const unanswered = userAnswers.filter(answer => answer === null || answer === undefined).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++;
}
});
quizSubmitted = true;
showResults();
saveScore(userName, score);
loadScoreboard();
}
function showResults() {
const container = document.getElementById("questionContainer");
container.innerHTML = "";
questions.forEach((q, index) => {
const selected = userAnswers[index];
const correct = q.correct;
let 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" style="display:block;">
<strong>Correct Answer:</strong> ${q.options[correct]}<br>
<strong>Explanation:</strong> ${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
<p><strong>Student:</strong> ${escapeHTML(userName)}</p>
<p>${score === questions.length ? "Excellent! Perfect Score! 🎉" :
score >= 7 ? "Very Good! Keep Practicing! 👏" :
score >= 5 ? "Good Effort! Revise and Try Again! 👍" :
"Keep Practicing! You Can Improve! đź’Ş"}</p>
`;
}
function saveScore(name, score) {
let scores = [];
try {
scores = JSON.parse(localStorage.getItem("quizScores")) || [];
if (!Array.isArray(scores)) scores = [];
} catch (error) {
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 (error) {
scores = [];
}
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML = scores.map(s => `
<li>${escapeHTML(s.name)} - ${s.score}/10 (${escapeHTML(s.date)})</li>
`).join("");
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, char => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
})[char]);
}
</script>
</body>
</html>