⚡ LALITHAM EXAMPORTAL
Online Examination System
Kerala PSC Mock Test
—
📋 Total Questions
5 min
⏱ Duration
+1
✅ Correct Mark
−0.33
❌ Negative Mark
• Each question has 4 options — choose the best answer.
• Use Mark for Review to flag questions and revisit later.
• Timer starts the moment you click Start Exam.
• Navigate freely using the Question Palette on the right.
• Do not refresh the page once the exam starts.
Question 1 of 0
📊 Result & Analysis
0
✓ Correct
0
✗ Wrong
0
– Skipped
0%
🎯 Accuracy
📝 Answer Key & Analysis
Submit Examination?
Once submitted, you cannot change your answers.
0
Answered
0
Not Answered
0
Marked
0
Total Qs
${key}
${vals[i]}
`;
c.appendChild(d);
});
const bm=$('btn-mark');
bm.className='btn-mark'+(marked[curQ]?' on':'');
$('btn-prev').disabled=curQ===0;
$('btn-next').disabled=curQ===questions.length-1;
updStats(); updPalette();
}function updStats(){
const a=Object.keys(answers).length;
const m=Object.values(marked).filter(Boolean).length;
$('s-ans').textContent=a;
$('s-not').textContent=questions.length-a;
$('s-mrk').textContent=m;
}// ── PALETTE ──
function buildPalette(){
const g=$('palette'); g.innerHTML='';
questions.forEach((_,i)=>{
const b=document.createElement('button');
b.className='qb'; b.textContent=i+1;
b.onclick=()=>{curQ=i;renderQ();};
g.appendChild(b);
});
}
function updPalette(){
document.querySelectorAll('#ep-root .qb').forEach((b,i)=>{
let c='qb';
if(i===curQ) c+=' cur';
if(answers[i]!==undefined) c+=marked[i]?' mrk ans':' ans';
else if(visited[i]) c+=marked[i]?' mrk':' noans';
b.className=c;
});
}// ── RESULT ──
function buildResult(){
const OPT=['A','B','C','D'];
let correct=0,wrong=0,skipped=0;
questions.forEach((q,i)=>{
if(answers[i]===undefined){skipped++;return;}
if(OPT[answers[i]]===q.ans) correct++;
else wrong++;
});
const score=correct-wrong*negVal;
const total=questions.length;
const acc=total>0?Math.round(correct/(correct+wrong||1)*100):0;
const taken=totalTime-timeLeft;const se=$('r-score');
se.innerHTML=`${score.toFixed(2)} / ${total}`;
$('r-lbl').textContent=`Correct: ${correct}×1 = ${correct} | Wrong: ${wrong}×-${negVal} = -${(wrong*negVal).toFixed(2)} | Skipped: ${skipped}`;
const g=score/total;
$('r-grade').textContent=g>=0.9?'🏆 Outstanding!':g>=0.7?'🥈 Excellent!':g>=0.5?'🥉 Good':g>=0.35?'📚 Needs Improvement':'💡 Keep Practicing';
$('r-c').textContent=correct; $('r-w').textContent=wrong;
$('r-s').textContent=skipped; $('r-a').textContent=acc+'%';
setTimeout(()=>{
$('pb-g').style.width=(correct/total*100).toFixed(1)+'%';
$('pb-r').style.width=(wrong/total*100).toFixed(1)+'%';
$('pb-s').style.width=(skipped/total*100).toFixed(1)+'%';
},100);
const tm=Math.floor(taken/60), ts=taken%60;
$('r-time').textContent=`Time: ${tm}m ${ts}s`;
window._epR={score:score.toFixed(2),total,c:correct,w:wrong,s:skipped,acc};// Answer Key
const list=$('ak-list'); list.innerHTML='';
questions.forEach((q,i)=>{
const ui=answers[i], ci=OPT.indexOf(q.ans);
const status=ui===undefined?'skipped':OPT[ui]===q.ans?'correct':'wrong';
const vals=[q.a,q.b,q.c,q.d];
const div=document.createElement('div');
div.className=`ak-item ${status}`; div.dataset.s=status;
const oh=vals.map((v,oi)=>{
let c='ak-opt', badge='';
if(oi===ci&&ui===ci){c+=' ba';badge='✓ Correct';}
else if(oi===ci){c+=' ca';badge='✓ Answer';}
else if(ui===oi){c+=' ua';badge='✗ Yours';}
return `${OPT[oi]}. ${v} ${badge}
`;
}).join('');
const tag=status==='correct'?`✓ Correct (+1)
`:
status==='wrong'?`✗ Wrong (-${negVal})
`:
`— Not Attempted (0)
`;
div.innerHTML=`Q${i+1}.${q.q}
${oh}
${tag}`;
list.appendChild(div);
});
}// ── START ──
if(document.readyState==='loading'){
document.addEventListener('DOMContentLoaded',boot);
} else {
boot();
}})();