ch5 part13
<!DOCTYPE html>
<html lang="en">
<head>
<title>🧠 Excretion and Dialysis Quiz – APICAL CLASSES</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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>🧠 Excretion and Dialysis 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. Kidney failure hone par body mein kya accumulate hone lagta hai?",
options: [
"A. Oxygen",
"B. Nitrogenous poisonous wastes",
"C. Glucose",
"D. Calcium"
],
correct: 1,
explanation: "Kidney ki activity reduce ya kidney failure hone par poisonous nitrogenous wastes body mein accumulate hone lagte hain, jo harmful ho sakte hain."
},
{
question: "2. Artificial kidney ka main function kya hai?",
options: [
"A. Blood mein oxygen add karna",
"B. Food digest karna",
"C. Blood se nitrogenous wastes remove karna",
"D. Blood cells banana"
],
correct: 2,
explanation: "Artificial kidney dialysis ke through blood se nitrogenous waste products remove karti hai."
},
{
question: "3. Artificial kidney mein tubes kis type ki lining se bani hoti hain?",
options: [
"A. Thick muscular lining",
"B. Semi-permeable lining",
"C. Waterproof lining",
"D. Bone lining"
],
correct: 1,
explanation: "Artificial kidney mein several tubes hoti hain jinmein semi-permeable lining hoti hai. Waste products is lining ke through dialysing fluid mein move karte hain."
},
{
question: "4. Dialysing fluid mein nitrogenous wastes kyun nahi hote?",
options: [
"A. Taaki wastes blood se fluid mein diffuse kar saken",
"B. Taaki blood clot ho sake",
"C. Taaki glucose blood mein enter kare",
"D. Taaki oxygen produce ho"
],
correct: 0,
explanation: "Dialysing fluid mein nitrogenous wastes absent hote hain. Isliye concentration difference ke kaaran wastes blood se dialysing fluid mein diffuse karte hain."
},
{
question: "5. Dialysis ke dauran blood se waste products dialysing fluid mein kis process se move karte hain?",
options: [
"A. Active transport",
"B. Osmosis",
"C. Diffusion",
"D. Transpiration"
],
correct: 2,
explanation: "Dialysis mein blood ke waste products diffusion ke through semi-permeable tubes se dialysing fluid mein move karte hain."
},
{
question: "6. Artificial kidney aur normal kidney ke function mein important difference kya hai?",
options: [
"A. Artificial kidney mein blood filter nahi hota",
"B. Artificial kidney mein reabsorption nahi hoti",
"C. Normal kidney blood transport nahi karti",
"D. Artificial kidney oxygen produce karti hai"
],
correct: 1,
explanation: "Artificial kidney dialysis ke through wastes remove karti hai, lekin normal kidney ki tarah reabsorption nahi hoti."
},
{
question: "7. Healthy adult mein kidneys ka initial filtrate approximately kitna hota hai per day?",
options: [
"A. 18 L",
"B. 80 L",
"C. 180 L",
"D. 280 L"
],
correct: 2,
explanation: "Healthy adult mein kidneys approximately 180 litres initial filtrate daily produce karti hain, lekin most filtrate reabsorb ho jaata hai."
},
{
question: "8. Healthy adult mein actual urine volume usually kitna hota hai per day?",
options: [
"A. 1–2 litres",
"B. 10–20 litres",
"C. 50 litres",
"D. 180 litres"
],
correct: 0,
explanation: "Initial filtrate about 180 L daily hota hai, lekin kidney tubules mein large amount reabsorb hone ke baad sirf 1–2 L urine actually excreted hota hai."
},
{
question: "9. Organ transplantation mein organ donor se organ kisko diya jaata hai?",
options: [
"A. Sirf doctor ko",
"B. Recipient ko jiska organ damaged ya failed hai",
"C. Sirf family member ko",
"D. Blood donor ko"
],
correct: 1,
explanation: "Transplantation mein donor ka organ surgically remove karke recipient mein transplant kiya jaata hai, jiska organ disease ya injury ke kaaran damaged ya failed ho gaya ho."
},
{
question: "10. Inmein se kaunsa organ living donor kuch cases mein donate kar sakta hai?",
options: [
"A. Kidney",
"B. Brain",
"C. Entire heart",
"D. Entire pancreas"
],
correct: 0,
explanation: "Kuch organs, jaise kidney, aur part of liver/lung, living donor ke through donate kiye ja sakte hain. Most organ donations donor ki death ya brain death ke baad hoti 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>