ch4part1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Magnetic Effect of Electric Current 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;
margin: 0;
}
.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; }
.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; }
@media (max-width: 600px) {
body { padding: 12px; }
.quiz-container { width: 100%; padding: 15px; }
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Magnetic Effect of Electric Current 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. Jab electric current wire mein flow karta hai, toh wire ke around kya produce hota hai?",
options: [
"A. Sirf sound",
"B. Magnetic field",
"C. Sirf light",
"D. Water vapour"
],
correct: 1,
explanation: "Jab electric current conductor, jaise wire, se flow karta hai, toh uske around magnetic field produce hoti hai. Is phenomenon ko magnetic effect of electric current kehte hain.<br><br><b>Example:</b> Current-carrying wire ke paas rakhi compass needle deflect kar sakti hai."
},
{
question: "2. Circuit ka switch ON karne par magnetic compass ki needle mein kya change hota hai?",
options: [
"A. Needle deflect hoti hai",
"B. Needle melt ho jaati hai",
"C. Needle ka magnetism hamesha ke liye khatam ho jaata hai",
"D. Needle disappear ho jaati hai"
],
correct: 0,
explanation: "Switch ON karne par circuit complete hota hai aur wire mein current flow karta hai. Wire ki magnetic field compass needle ki direction ko change kar sakti hai.<br><br><b>Example:</b> Compass needle north direction mein point kar rahi ho, toh current ON karne par woh apni original direction se turn kar sakti hai."
},
{
question: "3. Switch OFF karne par compass needle generally kya karti hai?",
options: [
"A. Hamesha rotate karti rehti hai",
"B. Wire se chipak jaati hai",
"C. Apni original direction mein laut aati hai",
"D. Apna colour change kar leti hai"
],
correct: 2,
explanation: "Switch OFF karne par current ruk jaata hai. Current ke kaaran produce hua magnetic effect disappear ho jaata hai, isliye compass needle generally apni original direction mein laut aati hai.<br><br><b>Example:</b> Switch ko ON aur OFF karne par compass needle ki position mein change observe kiya ja sakta hai."
},
{
question: "4. Magnetic compass ki needle asal mein kya hoti hai?",
options: [
"A. Ek electric cell",
"B. Ek plastic strip",
"C. Ek ordinary iron wire",
"D. Ek chhota magnet"
],
correct: 3,
explanation: "Compass needle ek tiny magnet hoti hai. Isliye woh nearby magnetic field ke influence mein apni direction change kar sakti hai.<br><br><b>Example:</b> Jab compass ke paas magnet laate hain, toh needle deflect hoti hai."
},
{
question: "5. Magnetic field kise kehte hain?",
options: [
"A. Wire ke andar ka empty space",
"B. Magnet ya current-carrying wire ke around ka region jahan magnetic effect feel ho sakta hai",
"C. Sirf battery ke andar ka region",
"D. Aisa region jahan gravity nahi hoti"
],
correct: 1,
explanation: "Magnetic field woh region hai jahan magnetic effect detect kiya ja sakta hai, jaise compass needle ke deflection se.<br><br><b>Example:</b> Current-carrying wire ke paas compass rakhkar uski needle ka deflection observe karna magnetic field ka evidence hai."
},
{
question: "6. Electric current ke magnetic effect ko investigate karne ke liye kaunsa instrument use kiya gaya?",
options: [
"A. Magnetic compass",
"B. Thermometer",
"C. Measuring cylinder",
"D. Spring balance"
],
correct: 0,
explanation: "Magnetic compass ki needle magnetic field ke influence mein deflect hoti hai. Isliye iska use current-carrying wire ke magnetic effect ko detect karne ke liye kiya ja sakta hai.<br><br><b>Example:</b> Wire ke neeche compass rakhkar switch ON karne par needle ki direction observe kar sakte hain."
},
{
question: "7. Experiment mein switch ka main function kya hai?",
options: [
"A. Wire ka colour change karna",
"B. Compass ko charge karna",
"C. Circuit ko open ya close karke current ko control karna",
"D. Magnetic field ko measure karna"
],
correct: 2,
explanation: "Switch ON karne par circuit complete hota hai aur current flow karta hai. Switch OFF karne par circuit open ho jaata hai aur current flow ruk jaata hai.<br><br><b>Example:</b> Room ka light switch ON karne par circuit complete hota hai aur bulb glow karta hai."
},
{
question: "8. Current-carrying wire ke magnetic effect ka sabse suitable evidence kya hai?",
options: [
"A. Wire ka colour change hona",
"B. Battery ka size badalna",
"C. Cardboard ka shape change hona",
"D. Wire ke paas compass needle ka deflect hona"
],
correct: 3,
explanation: "Compass needle magnet hoti hai. Uski direction change hona indicate karta hai ki wire ke current se magnetic effect produce ho raha hai.<br><br><b>Example:</b> Current OFF hone par needle original direction mein laut sakti hai, aur current ON hone par phir deflect ho sakti hai."
},
{
question: "9. Magnetic effect of electric current kaunsa statement correctly explain karta hai?",
options: [
"A. Current sirf heat produce karta hai",
"B. Conductor mein current flow hone par uske around magnetic field produce hoti hai",
"C. Magnetic field sirf permanent magnets se produce hoti hai",
"D. Current flow hone par magnetic field kabhi produce nahi hoti"
],
correct: 1,
explanation: "Electric current aur magnetism ke beech connection hota hai. Current-carrying conductor apne around magnetic field create karta hai.<br><br><b>Example:</b> Electromagnet mein wire se current pass karke magnetic effect ka use iron objects ko attract karne ke liye kiya ja sakta hai."
},
{
question: "10. Current-carrying wire ki magnetic field ke baare mein kaunsa statement correct hai?",
options: [
"A. Current band hone par current-produced magnetic field disappear ho jaati hai",
"B. Current band hone ke baad bhi magnetic field hamesha same rehti hai",
"C. Magnetic field sirf plastic mein produce hoti hai",
"D. Magnetic field ka compass needle par koi effect nahi hota"
],
correct: 0,
explanation: "Is activity mein wire ki magnetic field electric current ke kaaran produce hoti hai. Current rukne par yeh magnetic effect disappear ho jaata hai, aur compass needle original direction mein laut aati hai.<br><br><b>Example:</b> Battery se connected simple electromagnet ka current band karne par uska magnetic effect bahut kam ho jaata hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
let submitted = false;
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) {
return alert("Please enter your name.");
}
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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 (submitted) return;
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) {
score++;
}
});
submitted = 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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, char => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
})[char]);
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
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("");
}
</script>
</body>
</html>
ch4part2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Electromagnet 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;
margin: 0;
}
.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;
}
.options label:hover { background: #f0f0f0; }
.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; }
#userName {
padding: 10px;
width: 65%;
max-width: 300px;
border: 1px solid #ccc;
border-radius: 6px;
}
@media (max-width: 600px) {
body { padding: 12px; }
.quiz-container { width: 100%; padding: 16px; }
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Electromagnet</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. Electromagnet banane ke liye iron nail ke around kya tightly wind kiya jaata hai?",
options: [
"A. Plastic strip",
"B. Cotton thread",
"C. Insulated wire",
"D. Paper sheet"
],
correct: 2,
explanation: "Insulated wire ko iron nail ke around coil ke form mein wind kiya jaata hai. Jab wire mein electric current flow karta hai, toh magnetic effect produce hota hai.<br><br><strong>Example:</strong> Wire-wrapped iron nail ko cell se connect karne par woh iron paper clips ko attract kar sakta hai."
},
{
question: "2. Electromagnet kab magnetic effect show karta hai?",
options: [
"A. Jab coil mein electric current flow karta hai",
"B. Jab wire ko cell se disconnect kar diya jaata hai",
"C. Jab coil mein current bilkul nahi hota",
"D. Jab iron nail ko plastic se replace kar diya jaata hai"
],
correct: 0,
explanation: "Current-carrying coil ke around magnetic field produce hoti hai. Isliye coil magnet ki tarah behave karti hai.<br><br><strong>Example:</strong> Cell se connected coil iron clips ko attract kar sakti hai."
},
{
question: "3. Electromagnet mein iron nail insert karne se kya effect hota hai?",
options: [
"A. Coil ka current hamesha stop ho jaata hai",
"B. Coil ka magnetic effect khatam ho jaata hai",
"C. Wire electricity conduct karna band kar deti hai",
"D. Electromagnet stronger ho jaata hai"
],
correct: 3,
explanation: "Iron nail coil ke andar magnetic field ko strengthen karne mein help karta hai. Isse electromagnet ka magnetic effect increase hota hai.<br><br><strong>Example:</strong> Iron core wali coil generally bina iron core wali coil se zyada strongly iron clips attract kar sakti hai."
},
{
question: "4. Current-carrying coil ke paas rakhi magnetic compass needle deflect kyon hoti hai?",
options: [
"A. Coil se sound produce hoti hai",
"B. Coil ke around magnetic field produce hoti hai",
"C. Compass needle electrically charge ho jaati hai",
"D. Coil ka colour change hota hai"
],
correct: 1,
explanation: "Compass needle ek chhota magnet hoti hai. Coil ki magnetic field uski direction ko change kar sakti hai, jise deflection kehte hain.<br><br><strong>Example:</strong> Coil ko cell se connect karne par compass needle apni original direction se turn kar sakti hai."
},
{
question: "5. Activity mein wire ke around cardboard cylinder banane ka main purpose kya hai?",
options: [
"A. Cell ko charge karna",
"B. Iron clips ko store karna",
"C. Wire ko cylindrical coil ke form mein wind karne ke liye support dena",
"D. Compass needle ko lock karna"
],
correct: 2,
explanation: "Chart paper ko cylinder banakar wire uske around neatly wind ki ja sakti hai. Isse cylindrical coil banti hai.<br><br><strong>Example:</strong> Pencil ke around paper cylinder bana kar us par insulated wire ki multiple turns lapeti ja sakti hain."
},
{
question: "6. Activity mein cylindrical coil par approximately kitne turns wire ke wind kiye gaye the?",
options: [
"A. 50 turns",
"B. 5 turns",
"C. 10 turns",
"D. 500 turns"
],
correct: 0,
explanation: "Activity mein approximately 50 turns wire ke wind karke cylindrical coil banayi gayi thi. Coil ke turns ki sankhya magnetic field ki strength ko affect kar sakti hai.<br><br><strong>Example:</strong> Same current aur similar conditions mein coil ke turns increase karne se magnetic field generally stronger ho sakti hai."
},
{
question: "7. Jab coil se electric current disconnect kiya jaata hai, toh compass needle generally kya karti hai?",
options: [
"A. Hamesha ek hi direction mein ghoomti rehti hai",
"B. Coil ke andar chali jaati hai",
"C. Permanent magnet ban jaati hai",
"D. Apni original direction mein laut aati hai"
],
correct: 3,
explanation: "Current stop hone par coil ka current-produced magnetic effect disappear ho jaata hai. Isliye compass needle generally apni original direction mein return karti hai.<br><br><strong>Example:</strong> Switch OFF karne par electromagnet ka magnetic effect bahut kam ho jaata hai aur iron clips gir sakti hain."
},
{
question: "8. Current-carrying coil jo magnet ki tarah behave karti hai, use kya kehte hain?",
options: [
"A. Electric cell",
"B. Electromagnet",
"C. Insulator",
"D. Magnetic compass"
],
correct: 1,
explanation: "Electric current se magnetic effect produce karne wali coil ko electromagnet kehte hain. Practical applications mein iski strength badhane ke liye commonly iron core use hota hai.<br><br><strong>Example:</strong> Electromagnet ka use scrap-yard crane mein iron aur steel objects ko lift karne ke liye kiya ja sakta hai."
},
{
question: "9. Electromagnet ki magnetic strength ko improve karne ke liye commonly kya use kiya jaata hai?",
options: [
"A. Wooden core",
"B. Rubber core",
"C. Iron core",
"D. Paper core only"
],
correct: 2,
explanation: "Iron core coil ke magnetic effect ko stronger banane mein help karta hai. Isi wajah se practical electromagnets mein commonly iron core use hota hai.<br><br><strong>Example:</strong> Iron nail ko current-carrying coil ke andar insert karne par coil stronger magnet ki tarah behave kar sakti hai."
},
{
question: "10. Battery se connected wire ko sirf kuch seconds ke liye connect karne ki warning kyon di gayi hai?",
options: [
"A. Zyada der tak connection se high current flow ho sakta hai, jis se cell weak aur wire hot ho sakti hai",
"B. Isse iron nail wooden nail ban jaata hai",
"C. Isse compass permanently damage hona certain hai",
"D. Isse wire ka insulation automatically disappear ho jaata hai"
],
correct: 0,
explanation: "Low-resistance circuit mein current zyada ho sakta hai. Isse cell jaldi discharge ho sakta hai aur wire heat ho sakti hai. Isliye circuit ko briefly connect karein aur battery terminals ko directly short-circuit na karein.<br><br><strong>Example:</strong> Coil ko cell se connect karke observation karein, phir wire ko disconnect kar dein."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
let submitted = 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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">${q.explanation}</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 (submitted) return;
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
submitted = 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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
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>
ch4part3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Electromagnet</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;
}
.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;
}
.options label:hover { background: #f0f0f0; }
.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; }
@media (max-width: 600px) {
body { padding: 12px; }
.quiz-container { width: 100%; padding: 16px; }
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Electromagnet & Earth's Magnetic Field</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. An electromagnet ke kitne poles hote hain?",
options: [
"A. Sirf one pole",
"B. Three poles",
"C. Two poles — North and South",
"D. Four poles"
],
correct: 2,
explanation: "Permanent magnet ki tarah electromagnet ke bhi do poles hote hain: North aur South. Inki polarity current ki direction par depend karti hai.<br><br><strong>Example:</strong> Electromagnet ke ek end par North pole aur doosre end par South pole ho sakta hai."
},
{
question: "2. Agar compass ka North pole electromagnet ke end A ki taraf attract hota hai, toh end A kaunsa pole hoga?",
options: [
"A. South pole",
"B. North pole",
"C. Dono poles",
"D. Koi pole nahi"
],
correct: 0,
explanation: "Unlike poles ek-doosre ko attract karte hain, jabki like poles repel karte hain. Isliye compass ka North pole agar end A ki taraf attract ho, toh end A South pole hoga.<br><br><strong>Example:</strong> North pole aur South pole paas laane par ek-doosre ko attract karte hain."
},
{
question: "3. Electromagnet ke end A aur end B ki polarity generally kaisi hoti hai?",
options: [
"A. Dono ends hamesha North hote hain",
"B. Dono ends hamesha South hote hain",
"C. Dono ends par koi polarity nahi hoti",
"D. Ek North aur doosra South hota hai"
],
correct: 3,
explanation: "Electromagnet ke do opposite poles hote hain. Ek end North hota hai aur doosra South.<br><br><strong>Example:</strong> Agar end A North hai, toh end B South hoga."
},
{
question: "4. Same coil mein cells ki sankhya badhane se electromagnet ki strength par kya effect ho sakta hai?",
options: [
"A. Strength hamesha zero ho jaati hai",
"B. Magnetic field stronger ho sakti hai",
"C. Coil plastic ban jaati hai",
"D. Compass ka magnetic effect khatam ho jaata hai"
],
correct: 1,
explanation: "Suitable conditions mein cells ki sankhya badhane se current increase ho sakta hai. Isse magnetic field stronger ho sakti hai aur compass needle ka deflection badh sakta hai.<br><br><strong>Example:</strong> Same coil mein suitable battery supply badhane par electromagnet zyada iron clips attract kar sakta hai."
},
{
question: "5. Coil mein wire ke turns ki sankhya badhane se kya hota hai?",
options: [
"A. Electromagnet hamesha weak ho jaata hai",
"B. Electric current automatically zero ho jaata hai",
"C. Electromagnet ki strength increase ho sakti hai",
"D. Coil ka magnetic effect impossible ho jaata hai"
],
correct: 2,
explanation: "Same current aur similar conditions mein coil ke turns badhane se magnetic field generally stronger hoti hai.<br><br><strong>Example:</strong> 50 turns wali coil ko suitable conditions mein 100 turns wali coil se compare karne par zyada turns wali coil stronger magnetic effect produce kar sakti hai."
},
{
question: "6. Electromagnet ke poles ko reverse karne ke liye kya change karna chahiye?",
options: [
"A. Current ki direction",
"B. Cardboard ka colour",
"C. Nail ki length ko hamesha double karna",
"D. Compass ko remove karna"
],
correct: 0,
explanation: "Coil mein current ki direction reverse karne par electromagnet ke North aur South poles interchange ho jaate hain.<br><br><strong>Example:</strong> Agar pehle end A North tha, toh current reverse karne par end A South ban sakta hai."
},
{
question: "7. Compass needle ka deflection zyada hone ka kya meaning ho sakta hai?",
options: [
"A. Compass toot gaya hai",
"B. Battery mein current nahi hai",
"C. Coil ka size zero ho gaya hai",
"D. Compass par magnetic field ka effect zyada strong hai"
],
correct: 3,
explanation: "Experiment ki conditions same hon, toh compass needle ka greater deflection coil ke stronger magnetic field ko indicate kar sakta hai.<br><br><strong>Example:</strong> More current ya more coil turns se magnetic field stronger ho sakti hai, jisse compass needle zyada deflect kar sakti hai."
},
{
question: "8. Earth ka magnetic field mainly kaise generate hota hai?",
options: [
"A. Clouds ki movement se",
"B. Earth ke liquid outer core mein moving electrically conducting material se",
"C. Mountains ke colour se",
"D. Moonlight se"
],
correct: 1,
explanation: "Earth ke liquid outer core mein iron-rich conducting material ki movement electric currents produce karti hai. Ye currents Earth ka magnetic field generate karne mein help karte hain.<br><br><strong>Example:</strong> Compass needle Earth ke magnetic field ke influence mein approximately north–south direction mein align hoti hai."
},
{
question: "9. Earth ka magnetic field migratory birds aur kuch animals ke liye kaise useful hai?",
options: [
"A. Unhe food automatically provide karta hai",
"B. Unki body ka temperature hamesha same rakhta hai",
"C. Navigation mein help kar sakta hai",
"D. Unhe flying ki zaroorat se free kar deta hai"
],
correct: 2,
explanation: "Kuch migratory birds, fish aur animals Earth ke magnetic field ko navigation ke liye use kar sakte hain. Isse unhe long distances par direction identify karne mein help mil sakti hai.<br><br><strong>Example:</strong> Kuch migratory birds apni seasonal migration ke dauraan Earth ke magnetic field se milne wale signals ka use kar sakte hain."
},
{
question: "10. Earth ke magnetic field ka ek important role kya hai?",
options: [
"A. Space se aane wale charged particles ke harmful effects ko kam karne mein help karna",
"B. Earth par gravity ko completely stop karna",
"C. Sunlight ko completely block karna",
"D. Ocean water ko permanently freeze karna"
],
correct: 0,
explanation: "Earth ka magnetic field kai charged particles ko deflect karta hai aur magnetosphere banata hai. Isse Earth ke aas-paas ka environment harmful solar particles se kuch protection paata hai.<br><br><strong>Example:</strong> Solar wind ke charged particles Earth ke magnetic field se interact karte hain, jisse polar regions mein aurora jaise natural light displays bhi ho sakte hain."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
let submitted = 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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">${q.explanation}</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 (submitted) return;
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
submitted = 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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
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>
ch4part4
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Lifting Electromagnet</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;
margin: 0;
}
.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;
}
.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;
}
input[type="text"] {
padding: 10px;
width: 60%;
max-width: 300px;
border: 1px solid #ccc;
border-radius: 6px;
}
#scoreboard {
margin-top: 25px;
background: #eef3f7;
padding: 15px;
border-radius: 8px;
}
#scoreboard h3 {
text-align: center;
}
ol {
padding-left: 20px;
}
hr {
border: none;
border-top: 1px solid #ddd;
margin: 20px 0;
}
@media (max-width: 600px) {
body {
padding: 10px;
}
.quiz-container {
width: 100%;
padding: 15px;
}
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Lifting Electromagnet & Electricity</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. Lifting electromagnet ka main use kya hai?",
options: [
"A. Water ko purify karna",
"B. Heavy iron aur steel objects ko lift karna",
"C. Plastic ko melt karna",
"D. Air ko cool karna"
],
correct: 1,
explanation: "Lifting electromagnets powerful electromagnets hote hain jo heavy iron aur steel objects ko lift aur move karne ke liye use kiye jaate hain.<br><br><strong>Example:</strong> Scrap yard mein crane ka electromagnet heavy iron rods aur steel sheets ko utha sakta hai."
},
{
question: "2. Lifting electromagnet ko commonly kis machine par lagaya jaata hai?",
options: [
"A. Crane",
"B. Refrigerator",
"C. Bicycle",
"D. Water filter"
],
correct: 0,
explanation: "Lifting electromagnet ko crane se attach kiya ja sakta hai. Crane operator current control karke metal objects ko lift aur release kar sakta hai.<br><br><strong>Example:</strong> Factory mein crane ek jagah se doosri jagah steel ke heavy parts move karti hai."
},
{
question: "3. Jab lifting electromagnet mein electric current ON hota hai, toh kya hota hai?",
options: [
"A. Magnetic field hamesha ke liye khatam ho jaati hai",
"B. Magnet plastic ko iron mein convert karta hai",
"C. Electromagnet metal ko attract nahi karta",
"D. Electromagnet iron aur steel objects ko attract karke lift kar sakta hai"
],
correct: 3,
explanation: "Current flow karne par electromagnet ke around magnetic field produce hoti hai. Is field ki help se woh suitable iron aur steel objects ko attract kar sakta hai.<br><br><strong>Example:</strong> Current ON karne par crane ka magnet steel ke tukdon ko utha sakta hai."
},
{
question: "4. Jab lifting electromagnet ka current OFF kar diya jaata hai, toh kya hota hai?",
options: [
"A. Magnetic field aur strong ho jaati hai",
"B. Electromagnet permanent magnet ban jaata hai",
"C. Magnetic field disappear ho jaati hai aur objects release ho sakte hain",
"D. Crane ka size badh jaata hai"
],
correct: 2,
explanation: "Current OFF karne par electromagnet ka magnetic effect disappear ho jaata hai, isliye woh objects ko release kar sakta hai.<br><br><strong>Example:</strong> Crane metal ko required place par le jaakar current OFF karti hai, jisse metal neeche gir jaata hai."
},
{
question: "5. Lifting electromagnets ka use kahan widely hota hai?",
options: [
"A. Scrap yards aur factories mein",
"B. Sirf swimming pools mein",
"C. Sirf gardens mein",
"D. Sirf classrooms mein"
],
correct: 0,
explanation: "Factories aur scrap yards mein heavy metal objects ko move, lift aur sort karne ke liye lifting electromagnets ka use hota hai.<br><br><strong>Example:</strong> Scrap yard mein crane mixed metal waste mein se iron aur steel items ko alag karne mein help karti hai."
},
{
question: "6. Lifting electromagnet ka sabse important advantage kya hai?",
options: [
"A. Yeh bina electricity ke hamesha kaam karta hai",
"B. Isse current ON/OFF karke magnetic effect control kiya ja sakta hai",
"C. Yeh har material ko attract karta hai",
"D. Yeh kabhi heat produce nahi kar sakta"
],
correct: 1,
explanation: "Electromagnet ka magnetic effect electric current ko control karke ON ya OFF kiya ja sakta hai. Isi wajah se metal objects ko lift aur release karna easy hota hai.<br><br><strong>Example:</strong> Crane metal ko lift karne ke liye current ON aur use chhodne ke liye current OFF karti hai."
},
{
question: "7. Electric current flow karne par conductor ke around kya produce hota hai?",
options: [
"A. Sirf sound waves",
"B. Sirf light",
"C. Magnetic field",
"D. Sirf water vapour"
],
correct: 2,
explanation: "Jab electric current kisi conductor, jaise wire, se flow karta hai, toh uske around magnetic field produce hoti hai.<br><br><strong>Example:</strong> Current-carrying wire ke paas magnetic compass rakhne par needle deflect kar sakti hai."
},
{
question: "8. Electricity aur magnetism ke beech kya relationship hai?",
options: [
"A. Dono ka kabhi koi connection nahi hota",
"B. Electricity sirf heat produce karti hai",
"C. Magnetism se electricity par kabhi effect nahi hota",
"D. Electric current magnetic field produce kar sakta hai, aur changing magnetic field electric current induce kar sakti hai"
],
correct: 3,
explanation: "Electricity aur magnetism closely connected hain. Current magnetic field produce karta hai. Moving magnet ya changing magnetic field suitable conditions mein conductor mein electric current induce kar sakti hai.<br><br><strong>Example:</strong> Generator mein magnetic field aur coil ke relative motion se electricity generate ki ja sakti hai."
},
{
question: "9. Electric motor ka main function kya hota hai?",
options: [
"A. Electrical energy ko mechanical energy mein convert karna",
"B. Mechanical energy ko hamesha sound mein convert karna",
"C. Water ko metal mein convert karna",
"D. Magnetic field ko completely remove karna"
],
correct: 0,
explanation: "Electric motor electrical energy ka use karke motion produce karti hai. Isliye motors fans, mixers aur kai machines mein use hoti hain.<br><br><strong>Example:</strong> Electric fan mein motor electrical energy ko rotating motion mein convert karti hai."
},
{
question: "10. Electric generator ka main function kya hota hai?",
options: [
"A. Electricity ko permanently store karna",
"B. Mechanical energy se electrical energy generate karna",
"C. Sirf iron objects ko lift karna",
"D. Current ko hamesha zero rakhna"
],
correct: 1,
explanation: "Generator mechanical energy ka use karke electrical energy produce karta hai. Ismein electromagnetic induction ka principle use hota hai.<br><br><strong>Example:</strong> Power station mein turbine ki movement generator ko chalati hai, jisse electrical energy generate hoti hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
let submitted = 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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] =
selected ? parseInt(selected.value, 10) : null;
}
function submitQuiz() {
if (submitted) return;
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) {
score++;
}
});
submitted = 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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, char => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
})[char]);
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
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("");
}
</script>
</body>
</html>
ch4part5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Heating Effect of Electric Current</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;
margin: 0;
}
.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;
}
.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;
}
input[type="text"] {
padding: 10px;
width: 60%;
max-width: 300px;
border: 1px solid #ccc;
border-radius: 6px;
}
#scoreboard {
margin-top: 25px;
background: #eef3f7;
padding: 15px;
border-radius: 8px;
}
#scoreboard h3 {
text-align: center;
}
ol {
padding-left: 20px;
}
hr {
border: none;
border-top: 1px solid #ddd;
margin: 20px 0;
}
@media (max-width: 600px) {
body {
padding: 10px;
}
.quiz-container {
width: 100%;
padding: 15px;
}
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Heating Effect of Electric Current</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. Nichrome wire mein electric current flow karne par kya hota hai?",
options: [
"A. Wire thandi ho jaati hai",
"B. Wire gayab ho jaati hai",
"C. Wire warm ya hot ho jaati hai",
"D. Wire plastic ban jaati hai"
],
correct: 2,
explanation: "Jab electric current kisi conductor se flow karta hai, toh usmein resistance ke kaaran electrical energy ka kuch part heat energy mein convert ho jaata hai.<br><br><strong>Example:</strong> Electric heater mein current flow karne par heating element garam ho jaata hai."
},
{
question: "2. Activity 4.5 mein kis type ki wire use ki gayi hai?",
options: [
"A. Nichrome wire",
"B. Cotton thread",
"C. Plastic wire",
"D. Rubber strip"
],
correct: 0,
explanation: "Is activity mein nichrome wire use hoti hai, kyunki same size aur length ki copper wire ke comparison mein nichrome wire higher resistance offer karti hai.<br><br><strong>Example:</strong> Electric heater aur toaster mein nichrome jaise resistance wires heating ke liye use ki jaati hain."
},
{
question: "3. Nichrome wire ko warm feel karne ke liye switch ko ON position mein approximately kitni der rakhna hai?",
options: [
"A. 2 seconds",
"B. 30 seconds",
"C. 5 minutes",
"D. 1 hour"
],
correct: 1,
explanation: "Activity mein switch ko lagbhag 30 seconds ke liye ON kiya jaata hai, phir OFF karke wire ke temperature mein difference observe kiya jaata hai.<br><br><strong>Example:</strong> Current flow karne ke baad wire pehle se zyada warm feel ho sakti hai.<br><br><strong>Safety:</strong> Garam nichrome wire ko haath mein pakadkar touch nahi karna chahiye. Textbook activity ko teacher ki supervision mein safely perform karein."
},
{
question: "4. Electric current ke flow ka opposition kya kehlata hai?",
options: [
"A. Magnetism",
"B. Reflection",
"C. Evaporation",
"D. Resistance"
],
correct: 3,
explanation: "Resistance conductor ki woh property hai jo electric current ke flow ka opposition karti hai. Different conductors ka resistance different ho sakta hai.<br><br><strong>Example:</strong> Same size aur length ki nichrome wire ka resistance copper wire se zyada hota hai."
},
{
question: "5. Same length aur thickness ki nichrome wire aur copper wire mein se generally kiski resistance zyada hoti hai?",
options: [
"A. Nichrome wire",
"B. Copper wire",
"C. Dono ka resistance hamesha zero hota hai",
"D. Dono ka resistance hamesha equal hota hai"
],
correct: 0,
explanation: "Nichrome, copper ke comparison mein current ke flow ko zyada oppose karta hai. Isliye same length aur thickness par nichrome ka resistance generally higher hota hai.<br><br><strong>Example:</strong> Copper wires electrical connections mein commonly use hoti hain, jabki nichrome heating elements mein use hoti hai."
},
{
question: "6. Electric current ke heating effect ka main reason kya hai?",
options: [
"A. Electrical energy ka sound energy mein convert hona",
"B. Electrical energy ka kuch part heat energy mein convert hona",
"C. Wire ka colour change hona",
"D. Magnetic compass ka move karna"
],
correct: 1,
explanation: "Conductor mein current flow karne par resistance ke kaaran electrical energy ka kuch part heat energy mein convert ho jaata hai. Isi ko heating effect of electric current kehte hain.<br><br><strong>Example:</strong> Electric iron mein current se heating element garam hota hai aur kapdon ki wrinkles remove karne mein help karta hai."
},
{
question: "7. Heating effect of electric current ka correct meaning kya hai?",
options: [
"A. Current se conductor hamesha freeze ho jaata hai",
"B. Current conductor ka mass khatam kar deta hai",
"C. Current flow karne par conductor heat produce karke warm ho sakta hai",
"D. Current sirf light produce karta hai"
],
correct: 2,
explanation: "Current-carrying conductor mein electrical energy heat energy mein convert ho sakti hai. Heat ki amount resistance, current aur time par depend karti hai.<br><br><strong>Example:</strong> Electric kettle mein heating element current flow karne par paani ko garam karta hai."
},
{
question: "8. Nichrome wire ko current pass karne se pehle aur baad mein observe karne ka purpose kya hai?",
options: [
"A. Wire ki length ko double karna",
"B. Wire ko magnet banana hi ekmatra purpose hai",
"C. Wire ka colour ya shape badalna",
"D. Current flow hone par temperature mein change observe karna"
],
correct: 3,
explanation: "Switch OFF hone par wire comparatively cool hoti hai. Current ko kuch der ON rakhne par wire warm ho sakti hai. Isse heating effect observe hota hai.<br><br><strong>Example:</strong> Heater ko ON karne par uska heating element garam hota hai, jabki OFF karne par dheere-dheere cool hota hai."
},
{
question: "9. Electric heating effect ka use kis device mein hota hai?",
options: [
"A. Electric iron",
"B. Simple wooden ruler",
"C. Glass marble",
"D. Paper notebook"
],
correct: 0,
explanation: "Electric iron mein current-carrying heating element electrical energy ko heat energy mein convert karta hai. Yeh heat kapdon ko press karne mein use hoti hai.<br><br><strong>Example:</strong> Electric iron ka base garam hota hai aur kapdon ki creases smooth karne mein help karta hai."
},
{
question: "10. Agar kisi conductor mein current flow karna band ho jaaye, toh heating ka kya hoga?",
options: [
"A. Wire hamesha aur zyada garam hoti rahegi",
"B. Electrical heating normally band ho jaayegi aur wire dheere-dheere cool ho sakti hai",
"C. Wire automatically plastic ban jaayegi",
"D. Wire ka resistance hamesha infinite ho jaayega"
],
correct: 1,
explanation: "Current OFF karne par electrical energy ka current-driven heating mein conversion ruk jaata hai. Wire apni surroundings ko heat transfer karke dheere-dheere cool ho sakti hai.<br><br><strong>Example:</strong> Electric heater ko switch OFF karne ke baad bhi uska element kuch samay tak warm reh sakta hai, phir thanda ho jaata hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
let submitted = 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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] =
selected ? parseInt(selected.value, 10) : null;
}
function submitQuiz() {
if (submitted) return;
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) {
score++;
}
});
submitted = 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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function escapeHTML(value) {
return String(value).replace(/[&<>"']/g, char => ({
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
})[char]);
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
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("");
}
</script>
</body>
</html>
ch4part6
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Heating Effect of Electric Current</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;
}
.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.7;
}
.options label {
display: block;
margin: 8px 0;
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
}
.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 {
text-align: center;
margin-top: 20px;
font-size: 18px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Heating Effect of Electric Current</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"></div>
<div id="scoreboard">
<h3>🏆 Scoreboard</h3>
<ol id="scoreList"></ol>
</div>
</div>
</div>
<script>
const questions = [
{
question: "1. Incandescent lamp ka filament kis wajah se glow karta hai?",
options: [
"A. Paani ke contact mein aane se",
"B. Electric current ke kaaran heat hone se",
"C. Hawa ke pressure se",
"D. Magnet ke attract karne se"
],
correct: 1,
explanation: "Explanation: Incandescent lamp mein electric current filament ko bahut zyada heat karta hai. Filament itna garam ho jaata hai ki glow karne lagta hai.<br><br>Example: Traditional incandescent bulb ko ON karne par uska filament bright light produce karta hai."
},
{
question: "2. Electric room heater kis principle par work karta hai?",
options: [
"A. Heating effect of electric current",
"B. Reflection of light",
"C. Evaporation of water",
"D. Gravitational force"
],
correct: 0,
explanation: "Explanation: Room heater mein current heating element se pass hota hai. Electrical energy heat energy mein convert hoti hai, jisse room warm hota hai.<br><br>Example: Sardi mein electric room heater room ka temperature badhane mein help karta hai."
},
{
question: "3. Electric appliances mein heat produce karne wali wire ya coil ko kya kehte hain?",
options: [
"A. Switch",
"B. Plug",
"C. Heating element",
"D. Fuse holder"
],
correct: 2,
explanation: "Explanation: Heating element ek rod ya wire ki coil hoti hai jo electric current pass hone par heat produce karti hai.<br><br>Example: Electric kettle aur electric iron mein heating element hota hai."
},
{
question: "4. Inmein se kaunsa appliance heating effect of electric current par work karta hai?",
options: [
"A. Wooden chair",
"B. Paper notebook",
"C. Plastic scale",
"D. Electric iron"
],
correct: 3,
explanation: "Explanation: Electric iron ka heating element current pass hone par garam hota hai. Yeh heat kapdon ki wrinkles remove karne mein help karti hai.<br><br>Example: Kapdon ko press karne ke liye electric iron use ki jaati hai."
},
{
question: "5. Kuch appliances mein heating element red hot kyun dikhai deta hai?",
options: [
"A. Woh bahut zyada heat hone ke kaaran glow karta hai",
"B. Usmein paani bhar jaata hai",
"C. Uska resistance hamesha zero hota hai",
"D. Usmein current flow nahi karta"
],
correct: 0,
explanation: "Explanation: Jab heating element ka temperature bahut high ho jaata hai, toh woh red hot glow kar sakta hai.<br><br>Example: Kuch electric stoves mein heating coil garam hone par red glow karti hai."
},
{
question: "6. Inmein se kaunsa appliance water ko heat karne ke liye use hota hai?",
options: [
"A. Electric fan",
"B. Electric kettle",
"C. Wall clock",
"D. Calculator"
],
correct: 1,
explanation: "Explanation: Electric kettle mein heating element electrical energy ko heat energy mein convert karta hai. Yeh heat water ka temperature badhati hai.<br><br>Example: Electric kettle mein chai banane ke liye paani garam kiya ja sakta hai."
},
{
question: "7. Electric wires mein transmission ke dauran energy loss kis form mein ho sakta hai?",
options: [
"A. Sound energy",
"B. Nuclear energy",
"C. Heat energy",
"D. Chemical energy only"
],
correct: 2,
explanation: "Explanation: Wires mein resistance hota hai. Current flow karne par electrical energy ka kuch part heat mein convert ho jaata hai, jisse transmission ke dauran energy loss hota hai.<br><br>Example: Long-distance power lines mein wires ke resistance ke kaaran kuch electrical energy heat ke roop mein lose hoti hai."
},
{
question: "8. Electrical appliance ke overheat hone se kya problem ho sakti hai?",
options: [
"A. Plug aur socket ke plastic parts melt ho sakte hain",
"B. Appliance hamesha cool ho jaata hai",
"C. Electricity ka use completely band ho jaata hai",
"D. Plastic parts aur strong ho jaate hain"
],
correct: 0,
explanation: "Explanation: Excessive heating se plugs aur sockets ke plastic parts damage ya melt ho sakte hain. Severe overheating se fire ka risk bhi ho sakta hai.<br><br>Example: Damaged plug ya loose connection se overheating ho sakti hai. Aise plug ko use nahi karna chahiye."
},
{
question: "9. Household electrical circuits mein safety devices kyun lagaye jaate hain?",
options: [
"A. Appliances ka colour change karne ke liye",
"B. Electricity ki speed ko zero karne ke liye",
"C. Wires ko unnecessarily heat karne ke liye",
"D. Electrical accidents aur overheating se hone wale damage ka risk kam karne ke liye"
],
correct: 3,
explanation: "Explanation: Fuse aur circuit breaker jaise safety devices excessive current hone par circuit ko disconnect kar sakte hain. Isse overheating, damage aur fire ka risk kam hota hai.<br><br>Example: Short circuit hone par circuit breaker trip karke electricity supply ko interrupt kar sakta hai."
},
{
question: "10. Hair dryer mein heating effect ka kya role hota hai?",
options: [
"A. Sirf magnetic field produce karna",
"B. Air ko heat karna, jabki fan air ko move karta hai",
"C. Water ko electricity mein convert karna",
"D. Current ko permanently store karna"
],
correct: 1,
explanation: "Explanation: Hair dryer mein heating element air ko warm karta hai aur fan us air ko bahar blow karta hai.<br><br>Example: Hair dryer se warm air nikalti hai, jo wet hair ko dry karne mein help karti 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";
showQuestion();
loadScoreboard();
}
function showQuestion() {
const q = questions[currentQuestion];
const container = document.getElementById("questionContainer");
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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] =
selected ? parseInt(selected.value) : null;
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) {
score++;
}
});
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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
<p>${score === 10 ? "Excellent! Perfect Score! 🏆" :
score >= 7 ? "Very Good! Keep it up! 👏" :
score >= 5 ? "Good effort! Keep practicing! 👍" :
"Keep learning and try again! 📚"}</p>
`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${s.name} - ${s.score}/${questions.length} (${s.date})</li>`
).join('');
}
</script>
</body>
</html>
ch4part7
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Science Quiz – Voltaic Cell</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;
}
.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;
}
.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 {
text-align: center;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Science Quiz – Voltaic Cell</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"></div>
<div id="scoreboard">
<h3>🏆 Scoreboard</h3>
<ol id="scoreList"></ol>
</div>
</div>
</div>
<script>
const questions = [
{
question: "1. Voltaic cell ko aur kis naam se jaana jaata hai?",
options: [
"A. Magnetic cell",
"B. Heating cell",
"C. Galvanic cell",
"D. Solar cell"
],
correct: 2,
explanation: "Explanation: Voltaic cell ko Galvanic cell bhi kehte hain. Ismein chemical reaction ke through chemical energy electrical energy mein convert hoti hai.<br><br>Example: Ek simple voltaic cell chemical reaction ki help se connected bulb ko glow karne ke liye electricity supply kar sakta hai."
},
{
question: "2. Voltaic cell mein kitni metal rods ya electrodes hote hain?",
options: [
"A. Do",
"B. Ek",
"C. Chaar",
"D. Koi bhi nahi"
],
correct: 0,
explanation: "Explanation: Voltaic cell mein different materials ki do metal rods hoti hain. In rods ko electrodes kehte hain.<br><br>Example: Ek simple cell mein zinc aur copper ki rods electrodes ke roop mein use ki ja sakti hain."
},
{
question: "3. Voltaic cell mein electrodes ko kis liquid mein partly dip kiya jaata hai?",
options: [
"A. Cooking oil",
"B. Petrol",
"C. Pure honey",
"D. Electrolyte"
],
correct: 3,
explanation: "Explanation: Electrolyte ek liquid ya solution hota hai jo ions ki movement allow karta hai. Voltaic cell mein yeh usually weak acid ya salt solution ho sakta hai.<br><br>Example: Salt solution ek electrolyte ka example hai."
},
{
question: "4. Voltaic cell mein electrodes ko kya kehte hain?",
options: [
"A. Insulators",
"B. Electrodes",
"C. Switches",
"D. Filaments"
],
correct: 1,
explanation: "Explanation: Voltaic cell ki metal rods ko electrodes kaha jaata hai. Ye electrolyte ke contact mein rehte hain aur chemical reaction ke through electricity generate karne mein help karte hain.<br><br>Example: Zinc rod aur copper rod simple cell mein electrodes ke examples ho sakte hain."
},
{
question: "5. Voltaic cell mein electricity kis process ke through generate hoti hai?",
options: [
"A. Sirf heating se",
"B. Sirf friction se",
"C. Electrodes aur electrolyte ke beech chemical reaction se",
"D. Sirf sunlight se"
],
correct: 2,
explanation: "Explanation: Electrodes aur electrolyte ke beech chemical reaction hoti hai. Is reaction se chemical energy electrical energy mein convert ho sakti hai.<br><br>Example: Battery mein chemical reactions ki wajah se torch ka bulb glow kar sakta hai."
},
{
question: "6. Voltaic cell ka main function kya hai?",
options: [
"A. Chemical energy ko electrical energy mein convert karna",
"B. Electrical energy ko hamesha heat mein convert karna",
"C. Sound ko chemical energy mein convert karna",
"D. Water ko metal mein convert karna"
],
correct: 0,
explanation: "Explanation: Voltaic cell chemical reactions se electricity provide karta hai, jise external circuit mein use kiya ja sakta hai.<br><br>Example: Remote control ki battery electrical energy supply karke remote ko operate karne mein help karti hai."
},
{
question: "7. Jab voltaic cell ko complete circuit se connect kiya jaata hai, toh kya hota hai?",
options: [
"A. Electrolyte turant solid ban jaata hai",
"B. Electric current flow kar sakta hai",
"C. Electrodes disappear ho jaate hain",
"D. Circuit mein current kabhi flow nahi karta"
],
correct: 1,
explanation: "Explanation: Complete circuit milne par charges flow kar sakte hain, jisse electric current produce hota hai. Open circuit mein continuous current flow nahi karta.<br><br>Example: Cell ko wires aur bulb se connect karke circuit complete karne par bulb glow kar sakta hai."
},
{
question: "8. Textbook ke conventional current direction ke according, external circuit mein current kis terminal se kis terminal ki taraf flow karta hai?",
options: [
"A. Negative terminal se positive terminal",
"B. Dono terminals se kisi taraf nahi",
"C. Sirf electrolyte ke andar",
"D. Positive terminal se negative terminal"
],
correct: 3,
explanation: "Explanation: Conventional current external circuit mein positive terminal se negative terminal ki taraf maana jaata hai. Electrons metallic wire mein opposite direction mein move karte hain.<br><br>Example: Simple battery aur bulb wale circuit mein conventional current ki direction positive terminal se bulb ke through negative terminal ki taraf hoti hai."
},
{
question: "9. Jab voltaic cell ke chemicals use up ho jaate hain, toh kya hota hai?",
options: [
"A. Cell hamesha zyada electricity generate karta hai",
"B. Cell permanent magnet ban jaata hai",
"C. Cell electricity supply karna band kar sakta hai",
"D. Cell ka electrolyte plastic ban jaata hai"
],
correct: 2,
explanation: "Explanation: Cell ke andar chemical reactants dheere-dheere use hote hain. Jab reaction electricity provide karne ke liye sufficient nahi rehti, toh cell dead ho sakta hai.<br><br>Example: Remote ki battery weak ya dead hone par remote properly kaam karna band kar sakta hai."
},
{
question: "10. Inmein se kaunsa statement Voltaic cell ke baare mein correct hai?",
options: [
"A. Ismein chemical reaction electricity generate karne mein help karti hai",
"B. Ismein electrolyte ki koi role nahi hoti",
"C. Ismein sirf ek electrode hota hai",
"D. Yeh chemicals use hone ke baad bhi hamesha electricity deta hai"
],
correct: 0,
explanation: "Explanation: Voltaic cell mein electrodes aur electrolyte ke beech chemical reaction electrical energy provide karti hai. Chemicals use up hone par cell dead ho sakta hai.<br><br>Example: Ek dry cell flashlight ko electricity deta hai, lekin chemicals ki capacity khatam hone par cell replace karna pad sakta hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) return alert("Please enter your name.");
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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] =
selected ? parseInt(selected.value) : null;
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML = `
<h3>Your Score: ${score} / ${questions.length}</h3>
<p>${score === 10 ? "Excellent! Perfect Score! 🏆" :
score >= 7 ? "Very Good! Keep it up! 👏" :
score >= 5 ? "Good effort! Keep practicing! 👍" :
"Keep learning and try again! 📚"}</p>
`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a,b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${s.name} - ${s.score}/${questions.length} (${s.date})</li>`
).join('');
}
</script>
</body>
</html>
ch4part8
<!DOCTYPE html>
<html lang="en">
<head>
<title>🧠 Lemon Battery Science Quiz – APICAL CLASSES</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;
}
.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; }
.options label {
display: block;
margin: 8px 0;
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
}
.options label:hover { background: #f0f0f0; }
.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;
}
.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; }
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Lemon Battery Science Quiz – APICAL CLASSES</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. Lemon battery banane ke liye kaun-se do metals use kiye jaate hain?",
options: [
"(a) Gold aur silver",
"(b) Copper wire aur iron nail",
"(c) Plastic aur rubber",
"(d) Aluminium foil aur paper"
],
correct: 1,
explanation: "Copper wire aur iron nail lemon cell mein electrodes ka kaam karte hain. Dono metals ki chemical properties different hoti hain, jiski wajah se electrical energy generate ho sakti hai.<br><br>Example: Ek lemon mein copper wire aur iron nail alag-alag insert karke simple cell banaya ja sakta hai."
},
{
question: "2. Lemon battery mein electrolyte kaun hota hai?",
options: [
"(a) Copper wire",
"(b) Iron nail",
"(c) Lemon juice",
"(d) LED"
],
correct: 2,
explanation: "Lemon juice electrolyte ka kaam karta hai. Ismein ions hote hain jo solution ke andar charge movement mein help karte hain aur chemical reaction ko support karte hain.<br><br>Example: Suitable salt solution bhi electrolyte ke roop mein use kiya ja sakta hai."
},
{
question: "3. Lemon battery mein copper wire aur iron nail ko ek-doosre se thodi doori par kyun insert kiya jaata hai?",
options: [
"(a) Dono electrodes ko directly touch hone se bachane ke liye",
"(b) Lemon ko freeze karne ke liye",
"(c) LED ka colour change karne ke liye",
"(d) Lemon juice ko completely remove karne ke liye"
],
correct: 0,
explanation: "Dono electrodes electrolyte ke contact mein hone chahiye, lekin unhe directly ek-doosre ko touch nahi karna chahiye. Direct contact se external circuit bypass ho sakta hai.<br><br>Example: Copper wire aur iron nail ko lemon ke andar paas rakhte hain, lekin touch nahi hone dete."
},
{
question: "4. Lemon battery ka LED glow karna kya indicate karta hai?",
options: [
"(a) Lemon completely dry hai",
"(b) Copper wire plastic ban gayi hai",
"(c) Iron nail melt ho gaya hai",
"(d) Cell electrical energy supply kar raha hai"
],
correct: 3,
explanation: "LED glow karna indicate karta hai ki cell current supply kar raha hai aur circuit mein sufficient voltage aur current available hai.<br><br>Example: Multiple lemons ko suitable arrangement mein connect karne par LED glow kar sakta hai."
},
{
question: "5. Agar lemon battery se connected LED glow nahi karta, toh pehla simple step kya try kar sakte hain?",
options: [
"(a) Copper wire ko plastic se replace kar dein",
"(b) LED ke connections reverse karke check karein",
"(c) Iron nail ko LED ke andar insert karein",
"(d) Lemon juice ko completely dry kar dein"
],
correct: 1,
explanation: "LED current ko mainly ek direction mein pass hone deta hai. Agar LED ki polarity reverse hai, toh woh glow nahi karega. Connections reverse karke check kar sakte hain, agar cell ka voltage aur current sufficient ho.<br><br>Example: LED ki longer lead ko positive aur shorter lead ko negative side se connect karke check karein."
},
{
question: "6. LED ki longer lead generally kis terminal ko indicate karti hai?",
options: [
"(a) Positive terminal",
"(b) Negative terminal",
"(c) Earth terminal",
"(d) Neutral terminal"
],
correct: 0,
explanation: "LED ki longer lead generally anode ya positive side hoti hai, jabki shorter lead generally cathode ya negative side hoti hai.<br><br>Example: LED ko battery se connect karte waqt longer lead positive aur shorter lead negative side par rakhi jaati hai."
},
{
question: "7. Lemon battery mein electrodes kaun-kaun se hote hain?",
options: [
"(a) Lemon aur LED",
"(b) Lemon juice aur connecting wire",
"(c) Copper wire aur iron nail",
"(d) Plastic container aur LED"
],
correct: 2,
explanation: "Electrodes conducting materials hote hain jo electrolyte ke contact mein rehte hain. Lemon battery mein copper wire aur iron nail electrodes hain.<br><br>Example: Ek lemon mein copper wire aur iron nail insert karke electrodes ko lemon juice ke contact mein rakha jaata hai."
},
{
question: "8. Inmein se kaunsa metal pair Voltaic cell banane ke liye use kiya ja sakta hai?",
options: [
"(a) Plastic aur rubber",
"(b) Wood aur paper",
"(c) Glass aur cotton",
"(d) Zinc aur copper"
],
correct: 3,
explanation: "Zinc aur copper jaise different metals ko suitable electrolyte ke saath use karke Voltaic cell banaya ja sakta hai. Inki different chemical properties electrical energy generate karne mein help karti hain.<br><br>Example: Zinc aur copper electrodes ko suitable electrolyte ke saath use karke simple Voltaic cell banaya ja sakta hai."
},
{
question: "9. Copper aur zinc electrodes ki polarity different kyun ho sakti hai?",
options: [
"(a) Dono metals ka colour different hone ke kaaran",
"(b) Dono metals ki chemical properties different hone ke kaaran",
"(c) Dono metals ka shape round hone ke kaaran",
"(d) Dono metals sunlight absorb karte hain"
],
correct: 1,
explanation: "Different metals electrolyte ke saath different chemical behaviour show karte hain. Isi wajah se Voltaic cell mein ek electrode positive aur doosra negative ho sakta hai.<br><br>Example: Suitable zinc-copper cell mein zinc negative aur copper positive electrode hota hai."
},
{
question: "10. Lemon battery mein lemons ko suitable arrangement mein connect karne ka main purpose kya hai?",
options: [
"(a) Cell ka output LED glow karne ke liye sufficient banane mein help karna",
"(b) Lemon ka taste sweet banana",
"(c) Copper wire ko insulator banana",
"(d) Iron nail ka colour permanently change karna"
],
correct: 0,
explanation: "Multiple lemon cells ko series mein connect karne se total voltage increase ho sakta hai. Isse LED glow karne ke liye sufficient voltage milne ki possibility badhti hai, although result electrodes, connections aur LED par bhi depend karta hai.<br><br>Example: Multiple lemon cells ko suitable series connection mein jodkar LED glow karne ki koshish kar sakte hain."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) return alert("Please enter your name.");
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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">${q.explanation}</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${s.name} - ${s.score}/10 (${s.date})</li>`
).join('');
}
</script>
</body>
</html>
ch4part9
<!DOCTYPE html>
<html lang="en">
<head>
<title>🧠 Dry Cell Science Quiz – APICAL CLASSES</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;
}
.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; }
.options label {
display: block;
margin: 8px 0;
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
}
.options label:hover { background: #f0f0f0; }
.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;
}
.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; }
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 Dry Cell Science Quiz – APICAL CLASSES</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. Dry cell ko “dry” kyun kaha jaata hai?",
options: [
"A. Ismein koi electrolyte nahi hota",
"B. Ismein sirf solid metal hota hai",
"C. Iska electrolyte thick, moist paste hota hai, liquid nahi",
"D. Ismein paani ki jagah hawa hoti hai"
],
correct: 2,
explanation: "Dry cell mein electrolyte liquid form mein nahi, balki thick moist paste ke form mein hota hai. Isi wajah se ise dry cell kaha jaata hai.<br><br>Example: Torch mein use hone wale common dry cell mein paste-like electrolyte hota hai."
},
{
question: "2. Dry cell ka container generally kis metal ka bana hota hai?",
options: [
"A. Zinc",
"B. Copper",
"C. Silver",
"D. Aluminium"
],
correct: 0,
explanation: "Common dry cell mein zinc container hota hai. Yeh container negative terminal ka kaam karta hai.<br><br>Example: Common torch cell ke outer zinc container ka connection negative terminal se hota hai."
},
{
question: "3. Common dry cell mein negative terminal kaun hota hai?",
options: [
"A. Carbon rod",
"B. Metal cap",
"C. Electrolyte paste",
"D. Zinc container"
],
correct: 3,
explanation: "Dry cell ka zinc container negative terminal hota hai, jabki centre mein carbon rod ke upar laga metal cap positive terminal hota hai.<br><br>Example: Torch ke cell ko correctly fit karne ke liye uske positive aur negative ends ko identify karna zaroori hai."
},
{
question: "4. Common dry cell mein positive terminal kis part se connected hota hai?",
options: [
"A. Zinc container",
"B. Carbon rod ke upar laga metal cap",
"C. Electrolyte paste only",
"D. Plastic cover"
],
correct: 1,
explanation: "Common dry cell mein centre ki carbon rod ke upar metal cap hota hai, jo positive terminal ka kaam karta hai.<br><br>Example: AA cell ke top par bana raised metal button generally positive terminal hota hai."
},
{
question: "5. Dry cell mein carbon rod kahan hoti hai?",
options: [
"A. Zinc container ke bahar",
"B. Cell ke bottom ke neeche",
"C. Cell ke centre mein",
"D. Cell se completely alag"
],
correct: 2,
explanation: "Carbon rod dry cell ke centre mein hoti hai aur uske upar metal cap hota hai, jo positive terminal ko represent karta hai.<br><br>Example: Common cylindrical dry cell ko diagram mein dekhen, toh carbon rod centre mein dikhai jaati hai."
},
{
question: "6. Dry cell ke carbon rod ke around kya hota hai?",
options: [
"A. Paste-like electrolyte",
"B. Pure water only",
"C. Cotton thread only",
"D. Empty space only"
],
correct: 0,
explanation: "Carbon rod ke around thick, moist electrolyte paste hota hai. Yeh cell ke andar chemical reactions aur ion movement mein help karta hai.<br><br>Example: Dry cell ke internal structure mein carbon rod ke aas-paas electrolyte paste present hota hai."
},
{
question: "7. Single-use dry cell ka kya meaning hai?",
options: [
"A. Isse sirf ek device mein use kar sakte hain",
"B. Isse sirf ek din use kar sakte hain",
"C. Isse electricity produce karne ke liye paani mein daalna hota hai",
"D. Jab iske chemicals use up ho jaate hain, toh ise recharge karke dobara use nahi kiya ja sakta"
],
correct: 3,
explanation: "Single-use cell ko non-rechargeable cell bhi kehte hain. Jab iski chemical energy useful electricity dene ke liye khatam ho jaati hai, toh ise replace karna padta hai.<br><br>Example: Ordinary non-rechargeable AA battery dead hone par use compatible new cell se replace kiya jaata hai."
},
{
question: "8. Dry cells everyday use mein Voltaic cells ke comparison mein kyun convenient hote hain?",
options: [
"A. Kyunki dry cells mein electrodes nahi hote",
"B. Kyunki unmein thick paste electrolyte hota hai, jo liquid electrolyte ki tarah freely spill nahi karta",
"C. Kyunki dry cells mein chemical reaction nahi hoti",
"D. Kyunki dry cells kabhi discharge nahi hote"
],
correct: 1,
explanation: "Dry cell ka paste-like electrolyte use karna convenient banata hai. Isliye dry cells portable devices mein widely use hote hain.<br><br>Example: Torch aur wall clock mein dry cells easily fit kiye ja sakte hain."
},
{
question: "9. Rechargeable batteries ka main advantage kya hai?",
options: [
"A. Unmein kabhi electricity ki zaroorat nahi hoti",
"B. Unhe har use ke baad throw karna padta hai",
"C. Suitable charger se charge karke kai baar use kiya ja sakta hai",
"D. Woh har material ko attract karti hain"
],
correct: 2,
explanation: "Rechargeable batteries ko suitable charger se charge karke dobara use kiya ja sakta hai. Isse repeated use ke liye har baar new battery kharidne ki zaroorat kam hoti hai.<br><br>Example: Rechargeable batteries toys, cameras aur kuch torches mein use hoti hain."
},
{
question: "10. Used-up single-use dry cells ko dispose karte waqt kya karna chahiye?",
options: [
"A. Local battery collection ya e-waste disposal instructions follow karni chahiye",
"B. Unhe jalana chahiye",
"C. Unhe khule paani mein phenkna chahiye",
"D. Unhe todkar electrolyte nikaalna chahiye"
],
correct: 0,
explanation: "Used batteries ko careless tareeke se phenkna environment ko harm kar sakta hai. Isliye unhe appropriate battery collection ya disposal system mein dena chahiye.<br><br>Example: Dead dry cells ko battery collection point par dena, unhe road ya water body mein phenkne se better hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) return alert("Please enter your name.");
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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">${q.explanation}</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
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;">${q.explanation}</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${s.name} - ${s.score}/10 (${s.date})</li>`
).join('');
}
</script>
</body>
</html>
ch4part10
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rechargeable Batteries Science Quiz – APICAL CLASSES</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;
}
.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;
}
.options label {
display: block;
margin: 8px 0;
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
}
.options label:hover { background: #f0f0f0; }
.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;
}
.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; }
</style>
</head>
<body>
<div class="quiz-container">
<h2>🔋 Rechargeable Batteries Science Quiz – APICAL CLASSES</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. Rechargeable batteries ka main advantage kya hai?",
options: [
"A. Inhe sirf ek baar use kar sakte hain",
"B. Inhe charge karke multiple times reuse kar sakte hain",
"C. Inhe electricity ki zaroorat nahi hoti",
"D. Inhe kabhi replace nahi karna padta"
],
correct: 1,
explanation: "Rechargeable batteries ko suitable charger se charge karke baar-baar use kiya ja sakta hai. Isse battery waste kam hota hai aur long term mein paise bhi bach sakte hain.<br><br><b>Example:</b> Rechargeable mobile phone battery ko charge karke phir se use kiya ja sakta hai."
},
{
question: "2. Inmein se kis device mein rechargeable battery commonly use hoti hai?",
options: [
"A. Wooden chair",
"B. Paper notebook",
"C. Plastic ruler",
"D. Laptop"
],
correct: 3,
explanation: "Laptop mein rechargeable battery hoti hai, jo laptop ko power supply karti hai. Battery discharge hone par use suitable charger se recharge kiya ja sakta hai.<br><br><b>Example:</b> Laptop ko charging adapter se connect karke uski battery recharge ki jaati hai."
},
{
question: "3. Rechargeable batteries ko baar-baar use karne se kya benefit hota hai?",
options: [
"A. Wastage kam hota hai aur money save hota hai",
"B. Battery ka weight hamesha double ho jaata hai",
"C. Electricity ki zaroorat khatam ho jaati hai",
"D. Battery kabhi discharge nahi hoti"
],
correct: 0,
explanation: "Ek rechargeable battery ko kai baar use karne se har baar new single-use battery kharidne ki zaroorat kam ho sakti hai. Isse waste aur long-term cost dono reduce ho sakte hain.<br><br><b>Example:</b> Rechargeable batteries ko compatible toys ya cameras mein repeatedly use kiya ja sakta hai."
},
{
question: "4. Lithium-ion battery ko commonly kis naam se jaana jaata hai?",
options: [
"A. Dry-air battery",
"B. Wooden battery",
"C. Li-ion battery",
"D. Water battery"
],
correct: 2,
explanation: "Lithium-ion battery ko short form mein Li-ion battery kehte hain. Yeh aaj bahut se rechargeable electronic devices mein use hoti hai.<br><br><b>Example:</b> Smartphones, laptops aur tablets mein Li-ion batteries commonly milti hain."
},
{
question: "5. Inmein se kaun-se metals Li-ion batteries ke context mein textbook mein mention kiye gaye hain?",
options: [
"A. Gold aur silver",
"B. Lithium aur cobalt",
"C. Iron aur tin only",
"D. Copper aur aluminium only"
],
correct: 1,
explanation: "Lithium aur cobalt jaise metals kuch rechargeable battery technologies mein important role play karte hain. Inki mining aur processing limited regions mein hone ke kaaran supply important issue hai.<br><br><b>Example:</b> Countries battery manufacturing ke liye lithium ki reliable supply secure karne par focus karti hain."
},
{
question: "6. Rechargeable batteries bhi kuch time baad weak kyun ho jaati hain?",
options: [
"A. Woh sunlight ko absorb karna band kar deti hain",
"B. Woh permanent magnets ban jaati hain",
"C. Woh hamesha water se fill ho jaati hain",
"D. Repeated charging aur use se battery dheere-dheere wear out hoti hai"
],
correct: 3,
explanation: "Rechargeable batteries ki life limited hoti hai. Time ke saath unki capacity kam ho sakti hai, isliye woh pehle ke comparison mein kam time tak charge hold karti hain.<br><br><b>Example:</b> Purana mobile phone pehle poora din chal sakta tha, lekin kuch saalon baad use zyada frequently charge karna pad sakta hai."
},
{
question: "7. Agar phone battery ko ek ya do saal baad frequently charge karna padta hai, toh possible reason kya hai?",
options: [
"A. Battery ki capacity time ke saath kam ho gayi hai",
"B. Phone ka screen colour badal gaya hai",
"C. Charging cable ka colour dark ho gaya hai",
"D. Phone ka speaker sound produce karta hai"
],
correct: 0,
explanation: "Repeated charging aur discharging ke baad battery ki capacity gradually reduce ho sakti hai. Lekin frequent charging ke aur reasons bhi ho sakte hain, jaise high screen brightness, background apps ya weak network.<br><br><b>Example:</b> Agar purana phone normal use mein bhi jaldi discharge hota hai, toh battery health check karna useful ho sakta hai."
},
{
question: "8. Solid-state batteries mein main change kya hota hai?",
options: [
"A. Battery mein koi electrode nahi hota",
"B. Battery sirf wood se banti hai",
"C. Liquid ya paste-like electrolyte ki jagah solid material use hota hai",
"D. Battery mein chemical processes bilkul nahi hote"
],
correct: 2,
explanation: "Solid-state batteries mein conventional liquid ya paste-like electrolyte ki jagah solid electrolyte use kiya jaata hai. Scientists in batteries ko develop kar rahe hain.<br><br><b>Example:</b> Future electric vehicles mein solid-state batteries ka use karne par research ho rahi hai."
},
{
question: "9. Scientists solid-state batteries ko develop karne par kyun kaam kar rahe hain?",
options: [
"A. Taaki batteries ka use impossible ho jaaye",
"B. Taaki possible improvements in safety, charging speed aur battery life mil sakein",
"C. Taaki batteries sirf watches mein use hon",
"D. Taaki electricity generate karna band ho jaaye"
],
correct: 1,
explanation: "Solid-state batteries se safety, faster charging aur longer life jaise benefits milne ki possibility hai. Yeh potential advantages hain; actual performance battery design aur technology par depend karegi.<br><br><b>Example:</b> Researchers aisi battery develop karne ki koshish kar rahe hain jo electric vehicle ko longer driving range de aur faster charge ho."
},
{
question: "10. Old rechargeable batteries ko recycle karna important kyun hai?",
options: [
"A. Unhe decoration ke liye use karna zaroori hai",
"B. Unhe paani mein dissolve karna chahiye",
"C. Unhe jalakar dispose karna chahiye",
"D. Useful materials recover karne aur battery waste kam karne ke liye"
],
correct: 3,
explanation: "Battery recycling se lithium aur cobalt jaise useful materials recover kiye ja sakte hain. Isse raw materials ki demand aur improper disposal se hone wale environmental harm ko kam karne mein help mil sakti hai.<br><br><b>Example:</b> Used phone battery ko authorised battery collection ya recycling centre par dena chahiye, household waste mein nahi phenkna chahiye."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) return alert("Please enter your name.");
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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${s.name} - ${s.score}/10 (${s.date})</li>`
).join('');
}
</script>
</body>
</html>
ch4part11
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Electric Current Effects Science Quiz – APICAL CLASSES</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;
}
.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; }
.options label {
display: block;
margin: 8px 0;
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
cursor: pointer;
transition: 0.3s;
}
.options label:hover { background: #f0f0f0; }
.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;
}
.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; }
</style>
</head>
<body>
<div class="quiz-container">
<h2>⚡ Electric Current Effects Science Quiz – APICAL CLASSES</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. Jab electric current kisi wire se flow karta hai, toh wire ke around kya produce hota hai?",
options: [
"A. Sirf heat",
"B. Magnetic field",
"C. Sirf sound",
"D. Water vapour"
],
correct: 1,
explanation: "Jab electric current conductor se flow karta hai, toh uske around magnetic field produce hoti hai. Is phenomenon ko magnetic effect of electric current kehte hain.<br><br><b>Example:</b> Current-carrying wire ke paas compass rakhne par compass needle deflect kar sakti hai."
},
{
question: "2. Current-carrying coil jo magnet ki tarah behave karti hai, use kya kehte hain?",
options: [
"A. Electrolyte",
"B. Dry cell",
"C. Heating element",
"D. Electromagnet"
],
correct: 3,
explanation: "Jab coil mein electric current flow karta hai, toh coil magnetic field produce karti hai aur magnet ki tarah behave kar sakti hai. Iron core use karne se electromagnet aur strong ho sakta hai.<br><br><b>Example:</b> Crane mein electromagnet ka use heavy iron aur steel objects ko lift karne ke liye hota hai."
},
{
question: "3. Electric current ke flow se conductor mein heat generate hone ko kya kehte hain?",
options: [
"A. Heating effect of electric current",
"B. Magnetic effect of electric current",
"C. Chemical effect only",
"D. Reflection of light"
],
correct: 0,
explanation: "Jab current conductor se flow karta hai, toh resistance ke kaaran electrical energy ka kuch part heat energy mein convert ho sakta hai.<br><br><b>Example:</b> Electric iron aur electric heater heating effect of electric current par work karte hain."
},
{
question: "4. Voltaic cell mein electricity generate hone ka main reason kya hai?",
options: [
"A. Sirf sunlight",
"B. Sirf friction",
"C. Chemical reactions",
"D. Sirf sound waves"
],
correct: 2,
explanation: "Voltaic cell ke andar electrodes aur electrolyte ke beech chemical reactions hoti hain. In reactions ki help se chemical energy electrical energy mein convert hoti hai.<br><br><b>Example:</b> Lemon battery mein copper aur iron electrodes aur lemon juice ki help se electricity generate ho sakti hai."
},
{
question: "5. Inmein se kaunsa statement rechargeable batteries ke baare mein correct hai?",
options: [
"A. Inhe sirf ek baar use kar sakte hain",
"B. Inhe suitable charger se recharge karke multiple times use kar sakte hain",
"C. Inhe kabhi charging ki zaroorat nahi hoti",
"D. Inhe electricity produce karne ke liye jalana padta hai"
],
correct: 1,
explanation: "Rechargeable batteries ko charge karke dobara use kiya ja sakta hai. Isse repeated use ke liye new batteries kharidne ki zaroorat kam ho sakti hai.<br><br><b>Example:</b> Mobile phone aur laptop mein rechargeable batteries use hoti hain."
},
{
question: "6. Ek nichrome wire mein electric current flow hota hai. Wire warm ho jaati hai aur paas rakhi compass needle deflect karti hai. Kaunsa option correct hai?",
options: [
"A. Sirf wire ka warm hona correct hai",
"B. Sirf compass ka deflect hona correct hai",
"C. Dono observations incorrect hain",
"D. Dono observations correct hain"
],
correct: 3,
explanation: "Current-carrying nichrome wire heat produce kar sakti hai aur uske around magnetic field bhi produce hoti hai. Isliye wire warm ho sakti hai aur compass needle deflect kar sakti hai.<br><br><b>Example:</b> Electric heater ka heating element garam hota hai, aur current-carrying wire ke paas compass magnetic field detect kar sakta hai."
},
{
question: "7. Nichrome wire ko electric heating devices mein commonly kyun use kiya jaata hai?",
options: [
"A. Kyunki woh electricity ka insulator hai",
"B. Kyunki uska resistance hamesha zero hota hai",
"C. Kyunki woh suitable conditions mein current flow hone par heat produce karti hai",
"D. Kyunki woh current ko completely block kar deti hai"
],
correct: 2,
explanation: "Nichrome ka resistance copper se zyada hota hai, same length aur thickness ki wire ke comparison mein. Isliye suitable current flow hone par yeh useful heat produce kar sakti hai.<br><br><b>Example:</b> Nichrome wire electric heater aur toaster ke heating elements mein use hoti hai."
},
{
question: "8. Agar electromagnet ki battery ke terminals reverse kar diye jaayein, toh kya hoga?",
options: [
"A. Coil ke magnetic poles reverse ho jaayenge",
"B. Coil ka iron core plastic ban jaayega",
"C. Magnetic field hamesha ke liye disappear ho jaayegi",
"D. Coil current ko heat mein convert karna band kar degi"
],
correct: 0,
explanation: "Battery terminals reverse karne se coil mein current ki direction reverse ho jaati hai. Isse electromagnet ke north aur south poles interchange ho jaate hain.<br><br><b>Example:</b> Electromagnet ke paas compass rakhkar current ki direction reverse karne par needle ki direction badal sakti hai."
},
{
question: "9. Lemon battery aur pure water wale cell mein se LED ko glow karne ke liye kaunsa arrangement zyada suitable hai, agar baaki conditions same hon?",
options: [
"A. Sirf pure water wala cell",
"B. Dono cells hamesha equal voltage produce karte hain",
"C. Koi bhi cell electricity produce nahi kar sakta",
"D. Lemon juice wala cell"
],
correct: 3,
explanation: "Lemon juice mein ions hote hain jo electrolyte ke roop mein charge movement mein help karte hain. Pure water comparatively poor conductor hota hai, isliye lemon juice wala cell zyada suitable hai. LED glow karna voltage, current aur correct connections par bhi depend karta hai.<br><br><b>Example:</b> Copper strip aur iron nail ko lemon mein insert karke cell banaya ja sakta hai."
},
{
question: "10. Ek electromagnet mein iron nail ko coil se nikaal diya jaata hai, lekin current flow hota rehta hai. Compass needle ke saath kya hoga?",
options: [
"A. Compass needle hamesha deflect hona band kar degi",
"B. Compass needle phir bhi deflect kar sakti hai, lekin deflection generally kam hoga",
"C. Compass needle melt ho jaayegi",
"D. Wire magnetic field produce nahi kar sakti"
],
correct: 1,
explanation: "Current-carrying coil iron core ke bina bhi magnetic field produce karti hai. Iron core magnetic field ko stronger banata hai, isliye nail remove karne par field generally weaker ho sakti hai.<br><br><b>Example:</b> Iron nail ke around wound coil current flow karne par strong electromagnet bana sakti hai; nail remove karne par coil ka magnetic effect phir bhi present rehta hai."
}
];
let currentQuestion = 0;
let score = 0;
let userAnswers = [];
let userName = "";
function startQuiz() {
userName = document.getElementById("userName").value.trim();
if (!userName) return alert("Please enter your name.");
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 = `
<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>
<div class="explanation" id="explain${currentQuestion}">
${q.explanation}
</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 nextQuestion() {
saveAnswer();
if (currentQuestion < questions.length - 1) {
currentQuestion++;
showQuestion();
}
}
function prevQuestion() {
saveAnswer();
if (currentQuestion > 0) {
currentQuestion--;
showQuestion();
}
}
function saveAnswer() {
const selected = document.querySelector('input[name="option"]:checked');
userAnswers[currentQuestion] = selected ? parseInt(selected.value) : null;
}
function submitQuiz() {
saveAnswer();
score = 0;
questions.forEach((q, index) => {
if (userAnswers[index] === q.correct) score++;
});
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;">
${q.explanation}
</div>
<hr>
`;
});
document.querySelector(".controls").style.display = "none";
document.getElementById("result").innerHTML =
`<h3>Your Score: ${score} / ${questions.length}</h3>`;
}
function saveScore(name, score) {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.push({
name,
score,
date: new Date().toLocaleString()
});
localStorage.setItem("quizScores", JSON.stringify(scores));
}
function loadScoreboard() {
let scores = JSON.parse(localStorage.getItem("quizScores")) || [];
scores.sort((a, b) => b.score - a.score);
document.getElementById("scoreList").innerHTML =
scores.map(s =>
`<li>${s.name} - ${s.score}/10 (${s.date})</li>`
).join('');
}
</script>
</body>
</html>