ch11 part10
<!DOCTYPE html>
<html lang="en">
<head>
<title>🧠 Science Quiz – Artificial Satellites and Space Technology</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>🧠 Science Quiz – Artificial Satellites and Space Technology</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. Artificial satellites ko space mein launch karne ka main purpose kya hai?",
options: [
"A. Earth ki gravity khatam karna",
"B. Communication, navigation aur scientific research mein help karna",
"C. Sun ki light ko block karna",
"D. Naye planets banana"
],
correct: 1,
explanation: "Artificial satellites alag-alag useful tasks perform karte hain, jaise communication, navigation, weather monitoring aur disaster management.<br><br>Example: GPS satellite ki help se hum mobile phone par apni location aur route find kar sakte hain."
},
{
question: "2. Natural satellite aur artificial satellite mein kya difference hai?",
options: [
"A. Natural satellite insaan banate hain",
"B. Artificial satellite naturally space mein banta hai",
"C. Natural satellite naturally exist karta hai, jabki artificial satellite humans banate hain",
"D. Dono ka koi difference nahi hai"
],
correct: 2,
explanation: "Natural satellites nature mein exist karte hain, jabki artificial satellites humans banakar rockets ki help se space mein launch karte hain.<br><br>Example: Moon Earth ka natural satellite hai, jabki Cartosat ek artificial satellite hai."
},
{
question: "3. Weather forecasting mein artificial satellites kaise help karte hain?",
options: [
"A. Clouds aur weather systems ko observe karke",
"B. Earth ko rotate karke",
"C. Rain ko completely stop karke",
"D. Sun ka temperature kam karke"
],
correct: 0,
explanation: "Weather satellites clouds, storms aur atmospheric conditions ki information collect karte hain. Is information se weather forecasts banane mein help milti hai.<br><br>Example: Cyclone ke movement ko satellite images se monitor karke logon ko warning di ja sakti hai."
},
{
question: "4. GPS navigation ke liye satellites ka kya use hai?",
options: [
"A. Mobile ki battery charge karna",
"B. Location aur direction determine karne mein help karna",
"C. Internet ko permanently free karna",
"D. Buildings ko move karna"
],
correct: 1,
explanation: "Navigation satellites signals bhejte hain. GPS receiver in signals ki help se apni location calculate karta hai.<br><br>Example: Google Maps par apni current location dekhna aur destination tak ka route follow karna."
},
{
question: "5. Earth ki detailed images capture karne wale satellites ka use kis kaam mein hota hai?",
options: [
"A. City planning aur map making",
"B. Food cook karne",
"C. Mobile screen repair karne",
"D. Earth ki rotation rokne"
],
correct: 0,
explanation: "Earth observation satellites land, roads, vegetation aur settlements ki images capture karte hain. In images se maps aur city plans improve kiye ja sakte hain.<br><br>Example: Kisi city mein naye roads ya buildings plan karne ke liye satellite images useful ho sakti hain."
},
{
question: "6. Stars aur other celestial objects ka scientific observation karne ke liye India ne kaunsa mission launch kiya?",
options: [
"A. Cartosat",
"B. AstroSat",
"C. Mangalyaan",
"D. Bhuvan"
],
correct: 1,
explanation: "AstroSat ek Indian space observatory mission hai, jo stars aur other celestial objects ka scientific observation karta hai.<br><br>Example: Scientists AstroSat se milne wale data ka use space objects ko study karne ke liye kar sakte hain."
},
{
question: "7. India ke Aditya-L1 mission ka main objective kya hai?",
options: [
"A. Moon ka mapping karna",
"B. Mars par land karna",
"C. Sun ka study karna",
"D. Earth ke oceans ko clean karna"
],
correct: 2,
explanation: "Aditya-L1 India ka solar mission hai. Iska purpose Sun aur uski activities ko study karna hai.<br><br>Example: Scientists Sun ke outer atmosphere aur solar activity ko samajhne ke liye Aditya-L1 ke observations ka use karte hain."
},
{
question: "8. Space debris working satellites ke liye dangerous kyun hai?",
options: [
"A. Yeh satellites se collide karke unhe damage kar sakta hai",
"B. Yeh Earth ki gravity ko completely khatam kar deta hai",
"C. Yeh sabhi stars ko cover kar deta hai",
"D. Yeh Moon ko Earth se door kar deta hai"
],
correct: 0,
explanation: "Purane satellites aur rocket parts space mein debris ban sakte hain. High speed se move karne wala debris active satellites ko damage kar sakta hai.<br><br>Example: Ek chhota metal fragment bhi fast-moving satellite se takrakar uske important instruments ko damage kar sakta hai."
},
{
question: "9. Earth ke atmosphere mein enter karne par small space debris ka kya ho sakta hai?",
options: [
"A. Woh ek naya satellite ban jata hai",
"B. Woh atmosphere mein jal sakta hai",
"C. Woh hamesha ke liye hawa mein float karta hai",
"D. Woh Moon ban jata hai"
],
correct: 1,
explanation: "Earth ke atmosphere mein enter karte waqt debris bahut tez speed se travel karta hai aur heating ke kaaran chhote pieces aksar burn up ho jaate hain. Bade pieces ke kuch parts ground tak pahunch sakte hain.<br><br>Example: Ek chhota fragment atmosphere mein jal kar destroy ho sakta hai, lekin ek bada fragment ground tak pahunchne ka risk rakh sakta hai."
},
{
question: "10. Vikram Sarabhai ko Father of the Indian Space Programme kyun kaha jata hai?",
options: [
"A. Unhone India mein space science aur satellite programme ko aage badhane mein pioneering role nibhaya",
"B. Unhone India ka pehla computer banaya",
"C. Unhone GPS invent kiya",
"D. Unhone Moon par pehla human bheja"
],
correct: 0,
explanation: "Vikram Sarabhai ne India ke space programme ki foundation aur development mein important contribution diya. Unke honour mein Vikram Sarabhai Space Centre ka naam rakha gaya.<br><br>Example: VSSC, Thiruvananthapuram mein, rockets aur launch vehicle technology develop karne ke liye kaam karta 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>