ch6 part 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🧠 Liquid Pressure 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;
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: 90%;
border: 1px solid #ccc;
border-radius: 6px;
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>🧠 LIQUID PRESSURE QUIZ – APICAL CLASSES</h2>
<div id="nameSection">
<p><strong>Enter your name to start:</strong></p>
<input type="text" id="userName" placeholder="Your Name">
<br>
<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. Rohan lives on the second floor, while his friend lives on the first floor of the same building. Both receive water from the same rooftop tank. Whose tap will generally have a more powerful water stream?",
options: [
"A. Rohan's second-floor tap",
"B. First-floor tap",
"C. Both taps will always have zero pressure",
"D. Both taps must have exactly the same pressure"
],
correct: 1,
explanation: "First-floor tap aur water tank ke water level ke beech height difference generally zyada hota hai. Isliye first floor par water pressure zyada ho sakta hai.<br><br><b>Example:</b> Rooftop tank se connected ground-floor tap aksar upper-floor tap se stronger stream deta hai."
},
{
question: "2. A water tank is filled to a greater height than before. What will generally happen to the water pressure near the bottom of the tank?",
options: [
"A. Pressure will increase",
"B. Pressure will become zero",
"C. Pressure will always remain unchanged",
"D. Pressure will decrease to half"
],
correct: 0,
explanation: "Liquid pressure depth ke saath increase karta hai. Water column ki height badhne par bottom par pressure bhi badhta hai.<br><br><b>Example:</b> Tank mein water level high hone par bottom ke outlet par water zyada pressure ke saath flow kar sakta hai."
},
{
question: "3. Two containers have different shapes, but both contain the same liquid up to the same height. Under the same conditions, how does the liquid pressure at their bottoms compare?",
options: [
"A. Wider container always has greater pressure",
"B. Narrower container always has greater pressure",
"C. Pressure depends only on the total weight of liquid",
"D. Pressure is the same at the bottoms"
],
correct: 3,
explanation: "Same liquid aur same depth par liquid pressure same hota hai, chahe container ki shape ya width different ho.<br><br><b>Example:</b> Ek wide aur ek narrow container mein water same height tak bhara ho, toh bottom pressure same ho sakta hai."
},
{
question: "4. A water pipe develops a small hole, and water sprays sideways onto the ground. What is the main reason for this?",
options: [
"A. Water has no weight",
"B. The pipe removes gravity",
"C. Water exerts pressure on the pipe walls",
"D. Air inside the pipe pulls water outward in every case"
],
correct: 2,
explanation: "Pipe ke andar water pressure hota hai. Hole hone par water pressure ki wajah se water opening se bahar nikalta hai.<br><br><b>Example:</b> Leaking garden hose se water side mein spray karta hai."
},
{
question: "5. A diver swims deeper into a swimming pool. What happens to the pressure exerted by the water on the diver?",
options: [
"A. It always becomes zero",
"B. It increases with depth",
"C. It decreases as depth increases",
"D. It depends only on the pool's width"
],
correct: 1,
explanation: "Same liquid mein depth badhne par water pressure badhta hai, kyunki diver ke upar water column ki height badh jaati hai.<br><br><b>Example:</b> Deep water mein diver ko surface ke paas ke comparison mein zyada water pressure experience hota hai."
},
{
question: "6. Meera pours water into a tall container. As the water level rises, the pressure near the bottom increases. Which factor best explains this change?",
options: [
"A. The water column becomes taller",
"B. The container changes colour",
"C. The bottom becomes wider automatically",
"D. The water loses its mass"
],
correct: 0,
explanation: "Liquid pressure ki value depth aur liquid ki density par depend karti hai. Water level badhne se bottom ke upar water column taller ho jaata hai, isliye pressure increase karta hai.<br><br><b>Example:</b> Overhead tank ko height par rakhne se neeche ke taps mein water pressure milta hai."
},
{
question: "7. A bottle contains water and has small openings on its side. When the openings are uncovered, water flows outward. What does this show?",
options: [
"A. Liquids exert pressure only upward",
"B. Liquids exert pressure only downward",
"C. Liquids do not exert pressure on containers",
"D. Liquids exert pressure on the sides of containers"
],
correct: 3,
explanation: "Side openings se water ka bahar nikalna show karta hai ki liquid container ki side walls par bhi pressure exert karta hai.<br><br><b>Example:</b> Water tank ki side mein leak hone par water bahar nikal sakta hai."
},
{
question: "8. A tall water tank and a short water tank contain the same liquid. If the water depth above their bottom outlets is greater in the tall tank, which outlet will generally experience greater liquid pressure?",
options: [
"A. The short tank's outlet",
"B. Both outlets must have zero pressure",
"C. The tall tank's outlet",
"D. Both outlets must have equal pressure regardless of depth"
],
correct: 2,
explanation: "Same liquid ke liye bottom pressure water depth badhne ke saath increase karta hai. Isliye greater depth wala outlet greater liquid pressure experience karega.<br><br><b>Example:</b> Tall rooftop tank mein water level kaafi high ho toh neeche ke outlet par pressure zyada ho sakta hai."
},
{
question: "9. A student says that liquid pressure at the bottom depends only on how much water is present in a container. Which statement is more accurate?",
options: [
"A. Pressure depends only on container colour",
"B. Pressure depends on liquid depth and density, not just total quantity",
"C. Pressure is always the same in every container",
"D. Pressure depends only on the container's width"
],
correct: 1,
explanation: "Bottom par liquid pressure mainly liquid ki density aur depth par depend karta hai. Sirf total water quantity se pressure decide nahi hota.<br><br><b>Example:</b> Different shapes ke containers mein same height tak water bharne par bottom pressure same ho sakta hai, even if total water quantity different ho."
},
{
question: "10. A plumber repairs a leaking water pipe. After the repair, the water no longer sprays from the hole. Which explanation is correct?",
options: [
"A. The repair closes the opening through which pressurised water escaped",
"B. The repair removes all the water's mass",
"C. The water stops experiencing gravity",
"D. The pipe can no longer contain any pressure"
],
correct: 0,
explanation: "Pipe ke andar water pressure ho sakta hai, lekin hole close karne par water us opening se escape nahi kar sakta.<br><br><b>Example:</b> Tap band karne par water flow ruk jaata hai, kyunki water ke nikalne ka path close ho jaata 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;">
<strong>Explanation:</strong><br>
${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>
Pages:
1 2 3 4 5 6 7 8 9 10 11 12