Copy and Paste the below code in the console:
Paper-1:
var right=0;var notAttempted=0;for(var i=0;i<150;i++)
{if(document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("bold")[4].textContent===' -- ')
{notAttempted++;}
if(document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("rightAns")[0].textContent
[0]===document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("bold")[4].textContent)
{right++;}}
wrong=150-notAttempted-right;
marks=right;
console.log("Attempted : "+
(150-notAttempted)+"\nUnattempted questions : "+notAttempted+"\nRight Answers : "+right+ "\nWrong Answers : "+wrong+"\nMarks : "+marks);
console.log("\n Unattempted questions and Questions which are answered wrong");
for(var i=0;i<150;i++)
{
if(document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("rightAns")[0].textContent
[0]!==document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("bold")[4].textContent)
{var question_number = document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[0].textContent;
console.log(question_number+"\n")}
}
Paper-2:
var right=0;var notAttempted=0;for(var i=0;i<150;i++)
{if(document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("bold")[4].textContent===' -- ')
{notAttempted++;}
if(document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("rightAns")[0].textContent
[0]===document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("bold")[4].textContent)
{right++;}}
wrong=150-notAttempted-right;
marks=right*2;
console.log("Attempted : "+
(150-notAttempted)+"\nUnattempted questions : "+notAttempted+"\nRight Answers : "+right+ "\nWrong Answers : "+wrong+"\nMarks : "+marks);
console.log("\n Unattempted questions and Questions which are answered wrong");
for(var i=0;i<150;i++)
{
if(document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("rightAns")[0].textContent
[0]!==document.getElementsByClassName('question-pnl')
[i].getElementsByClassName("bold")[4].textContent)
{var question_number = document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[0].textContent;
console.log(question_number+"\n")}
}
Comments
Post a Comment