Review all 100 questions before submitting. Your result will be displayed immediately.
'; w.innerHTML=h; } /* โโ START โโ */ window.qp_start=function(){ var n=(document.getElementById('qp-name').value||'').trim(); var e=(document.getElementById('qp-email').value||'').trim(); if(!n){alert('Please enter your full name.');return;} if(e.indexOf('@')<1){alert('Please enter a valid email address.');return;} cname=n; qp_build(); document.getElementById('qp-reg').style.display='none'; document.getElementById('qp-quiz').style.display='block'; document.getElementById('qp-score-badge').style.display='block'; qp_timer_start(); }; /* โโ PICK OPTION โโ */ window.qp_pick=function(qn,ci){ if(done)return; if(ua.hasOwnProperty(qn))return; var q=QD[qn-1]; ua[qn]=ci; var ri=q.ans; var ok=(ci===ri); for(var i=0;i'+LTRS[ri]+': '+q.opts[ri]+'.'; fb.innerHTML=''+v+' '+q.rat; } qp_prog(); }; /* โโ PROGRESS โโ */ function qp_prog(){ var n=Object.keys(ua).length; var el=document.getElementById('qp-answered'); if(el)el.textContent=n+'/100'; var pf=document.getElementById('qp-prog-fill'); if(pf)pf.style.width=n+'%'; } /* โโ TIMER โโ */ function qp_timer_start(){ tmr=setInterval(function(){ secs--; var m=Math.floor(secs/60), s=secs%60; var el=document.getElementById('qp-timer'); if(!el){clearInterval(tmr);return;} el.textContent=(m<10?'0':'')+m+':'+(s<10?'0':'')+s; el.className=''; if(secs<=300)el.className='qp-warn'; if(secs<=60)el.className='qp-danger'; if(secs<=0){clearInterval(tmr);qp_submit();} },1000); } /* โโ SUBMIT โโ */ window.qp_submit=function(){ if(done)return; done=true; clearInterval(tmr); var eng=0,ch=0,ped=0; for(var i=0;i=80)msg='๐ Excellent! Outstanding performance โ you are well prepared for the FPSC SET exam!'; else if(tot>=60)msg='๐ Good result! Review weak areas and you will be ready for success.'; else if(tot>=40)msg='๐ Keep studying! Focus on Chemistry and Pedagogy to raise your score.'; else msg='๐ช Don\'t give up! Revise all sections and retake the test. Practice makes perfect!'; document.getElementById('qp-res-msg').textContent=msg; try{window.scrollTo({top:0,behavior:'smooth'});}catch(e){} }; })(); // end IIFE โ no global pollution