Computer Quiz
Test Exams
Question of
Good Try!
You Got out of answers correct!
That’s
const options=document.querySelector(".options").children; const answerTrackerContainer=document.querySelector(".answers-tracker"); const questionNumberSpan=document.querySelector(".question-num-value"); const totalQuestionSpan=document.querySelector(".total-question"); const correctAnswerSpan=document.querySelector(".correct-answers"); const totalQuestionSpan2=document.querySelector(".total-question2"); const percentage=document.querySelector(".percentage"); const question=document.querySelector(".question"); const op1=document.querySelector(".option1"); const op2=document.querySelector(".option2"); const op3=document.querySelector(".option3"); const op4=document.querySelector(".option4"); let questionIndex; let index=0; let myArray=[]; let myArr=[]; let score=0;
// questions and options and answers
const questions=[ { q:'A device that allows users to feed data into a computer for analysis and storage and to give commands to the computer is called', options:['A.output ','B.Input','C.Memory','D.Both A & B'], answer:2 }, { q:'Which of the following is not a pointing device?', options:['A.Mouse','B.Joystick','C.Light pen','D.Digitizer'], answer:4 }, { q:'Mouse is?', options:['A.Pointing device','B.Cursor conrol device','C.Monitoring device','D.Both A & B'], answer:4 }, { q:'LCD stands for', options:['Lead crystal device','B.Liquid central display ','C. Liquid crystal display','D. Light central display'], answer:3 }, { q:'Chain printer is a printer', options:['A.Non impact', 'B.Daisy wheel' ,'C.dot matrix' ,'D.Line' ], answer:4 }, { q:'The first computer mouse was developed by', options:['A.William English ','B.Daniel Cougher','C.Douglas Engelbart','D.Robert Zawaski'], answer:3 }, { q:'The OMR stands for', options:['Only Mark Recognition','B.Optical Magnetic Reader ','C. Optical Markup Recognition','D. Optical Mark Recognition'], answer:4 }, { q:'Daisy wheel printer is what type a printer?', options:['A. Impact','B. Non Impact','C. Lazer','D. Line Printer'], answer:1 }, { q:'What type of device converts digital signals into a form that is intelligible to the user?', options:['A. Storage devices','B.Keyboards ','C. Output devices','D. Input Device'], answer:3 }, { q:'Dotmatrix is a type of device', options:['A. Scanner ','B.Printer' ,'C.Keyboard' ,'D.Mouse' ], answer:2 }, { q:'Which of following produces high quality output', options:['A.Impact printer','B.Non impact Printer ','C. Plotter','D. Dotmatrix Printer'], answer:3 }, { q:'Ctrl, Shift and Alt are called ……….. keys', options:['A.function ', 'Adjustment' ,'C.Modifier' ,'D. None of the Above' ], answer:3 }, { q:'A joystick is primarily used to/ for …', options:['A. Print Text','B.Enter Text' ,'C.Draw picture' ,'D.Computer gaming' ], answer:4 }, { q:'Optical mouse was introduced by ______?', options:['A.Microsoft, 1999' ,'B.IBM, 1920' ,'C.Intel, 1930' ,'D.Dell, 1829' ], answer:1 }, { q:'The mouse generally has _____?', options:['A.Two buttons' ,'B.Several buttons ' ,'C.Three buttons ' ,'D.four buttons' ], answer:3 }, { q:'When a key is pressed, a keyboard interacts with', options:['A.Sensor' ,'B.Keyboard controller' ,'C.Keyboard buffer' ,'D.Both B and C' ], answer:4 }, { q:'Which of the following units are used to count the speed of the printer?', options:['A.CPM' ,'B.PPM' ,'C.LPM' ,'D.All of the Above' ], answer:4 }, { q:'How many bits of data can be transferred by parallel port?', options:['A.2' ,'B.4' ,'C.8' ,'D.16' ], answer:3 }, { q:'An optical mouse uses', options:['A.Microwave' ,'B.Infrared light' ,'C.Sensors' ,'D.Light Emitting Diode(LED)' ], answer:4 }, { q:'Digitizer is a(n).', options:['A.output device' ,'B.Input device' ,'C.Both input and output device' ,'D.None of the above' ], answer:2 }, { q:'Find the odd one', options:['A.Mouse' ,'B.Joystick' ,'C.Light pen' ,'D.Headphone' ], answer:4 }, { q:'Both Input And Output?', options:['A.Modem' ,'B.Scanner' ,'C.MICR' ,'D.All of the above' ], answer:1 }, { q:'On which one of the following output devices is hard copy often displayed', options:['A.Scanner' ,'B.Monitor' ,'C.Printer' ,'D.Keyboard' ], answer:3 }, { q:'Which of the following is a type of image scanner', options:['A.Flat held' ,'B.Hand held' ,'C.compact' ,'D.Flat bed' ], answer:4 }, {
q:'Laser printers belong to', options:['A.line printer','B.Page printer','C.band printer','D.dot matrix printer'], answer:2 }
]
// set questions and options and question number totalQuestionSpan.innerHTML=questions.length; function load(){ questionNumberSpan.innerHTML=index+1; question.innerHTML=questions[questionIndex].q; op1.innerHTML=questions[questionIndex].options[0]; op2.innerHTML=questions[questionIndex].options[1]; op3.innerHTML=questions[questionIndex].options[2]; op4.innerHTML=questions[questionIndex].options[3]; index++; }
function check(element){ if(element.id==questions[questionIndex].answer){ element.classList.add("correct"); updateAnswerTracker("correct") score++; console.log("score:"+score) } else{ element.classList.add("wrong"); updateAnswerTracker("wrong")
} disabledOptions() }
function disabledOptions(){
for(let i=0; i