-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Description
<title>Test With Mind</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f4f4f4;
padding: 20px;
text-align: center;
}
.card {
background: #fff;
padding: 20px;
margin: auto;
max-width: 600px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
border-radius: 10px;
}
input, select, button {
margin: 10px;
padding: 10px;
width: 90%;
}
.question {
margin: 20px 0;
}
.option {
display: block;
margin: 5px 0;
}
</style>
<script>
const quizData = {
History: {
"The Rise of Nationalism in Europe": [
{
question: "French Revolution kab shuru hua?",
options: ["1789", "1804", "1815", "1795"],
answer: "1789"
},
{
question: "Napoleon ne Code of Law kab lagu kiya?",
options: ["1804", "1789", "1830", "1815"],
answer: "1804"
}
]
},
Science: {
"Nutrition in Animals": [
{
question: "Human digestion sabse pehle kahan hoti hai?",
options: ["Stomach", "Small intestine", "Mouth", "Large intestine"],
answer: "Mouth"
},
{
question: "Liver kya banata hai?",
options: ["Bile", "Insulin", "Saliva", "Pepsin"],
answer: "Bile"
}
]
}
};
function loadChapters() {
const subject = document.getElementById('subjectSelect').value;
const chapterSelect = document.getElementById('chapterSelect');
chapterSelect.innerHTML = 'Chapter chunein';
if (quizData[subject]) {
Object.keys(quizData[subject]).forEach(chapter => {
const opt = document.createElement('option');
opt.value = chapter;
opt.textContent = chapter;
chapterSelect.appendChild(opt);
});
}
}
function startTest() {
const name = document.getElementById('studentName').value;
const subject = document.getElementById('subjectSelect').value;
const chapter = document.getElementById('chapterSelect').value;
const quizSection = document.getElementById('quizSection');
if (!name || !subject || !chapter) {
alert("Kripya sabhi fields bhariye");
return;
}
const questions = quizData[subject][chapter];
let index = 0;
let score = 0;
function showQuestion() {
if (index >= questions.length) {
quizSection.innerHTML = `
`;
}
window.submitAnswer = (selected) => {
if (selected === questions[index].answer) {
score++;
}
index++;
showQuestion();
};
quizSection.style.display = 'block';
showQuestion();
}
</script>
Test With Mind
Apna naam daalein aur subject/chapter chunein
Subject chunein History Science Chapter chuneinTest Shuru karein
Result
Naam: ${name}
Subject: ${subject}
Chapter: ${chapter}
Score: ${score}/${questions.length}
Test Complete ho gaya!
`; return; } const q = questions[index]; quizSection.innerHTML = `Q${index + 1}: ${q.question}
${q.options.map(option => ` ${option} `).join('')}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels