SSC Answer Key Script to check marks

Using the given script you will be able to check your marks and the number of attempted questions using the console of your browser. It will save your time to calculate the marks manually.

Steps to check marks from SSC answer key:

  • Login to your SSC answer key webpage in any browser on your PC or Laptop.
  • Click on generate answer key.
  • Now right-click on the page and select Inspect.
  • Select the Console tab in the opened window.
  • Paste the code given below in the console and press enter.

For SSC CPO

var right=0;var notAttempted=0;for(var i=0;i<200;i++){if(document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[5].textContent===' -- '){notAttempted++;}if(document.getElementsByClassName('question-pnl')[i].getElementsByClassName("rightAns")[0].textContent[0]===document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[5].textContent){right++;}}wrong=200-notAttempted-right; marks=right*1-wrong*.25; console.log("Attempted : "+(200-notAttempted)+"\nRight Answers : "+right+ "\nWrong Answers : "+wrong+"\nMarks : "+marks)

For SSC CGL

var right=0;var notAttempted=0;for(var i=0;i<100;i++){if(document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[5].textContent===' -- '){notAttempted++;}if(document.getElementsByClassName('question-pnl')[i].getElementsByClassName("rightAns")[0].textContent[0]===document.getElementsByClassName('question-pnl')[i].getElementsByClassName("bold")[5].textContent){right++;}}wrong=100-notAttempted-right; marks=right*2-wrong*.5; console.log("Attempted : "+(100-notAttempted)+"\nRight Answers : "+right+ "\nWrong Answers : "+wrong+"\nMarks : "+marks)

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *