Quiz 01

1

/* css here */

{
border: 1px dotted black;
}

p.question {
font-family: Arial, sans-serif;
font-size:20px;
color: #2E2E2E;
margin-bottom:0px;
}

h2.quizHeader {
font-family: Arial, sans-serif;
font-weight:normal;
font-size:25px;
line-height: 27px;
margin: 24px 0 12px 0;
padding: 0 0 4px 0;
border-bottom: 1px solid #a2a2a2;
}

h2.quizScore{
font-family: Arial, sans-serif;
font-size:25px;
}

div.quizAnswers{
font-family: Arial, sans-serif;
font-size:16px;
color: #424242;
padding: 4px 0 4px 0;
}

label {
font-family: Arial, sans-serif;
font-size:14px;
color: #424242;
vertical-align:top;
}

input.answer[type=”radio”] {
margin-bottom: 10px;
}

input.quizSubmit[type=”submit”] {
-webkit-background-clip: border-box;
-webkit-background-origin: padding-box;
-webkit-background-size: auto;
-webkit-transition-delay: 0s, 0s;
-webkit-transition-duration: 0.2s, 0.2s;
-webkit-transition-property: color, background-color;
-webkit-transition-timing-function: ease, ease;
box-shadow: rgba(0, 0, 0, 0.498039) 0px 0px 5px 0px;
color: #ffffff;
background-color: #c30b0a;
margin: 0;
border: 0;
outline: 0;
text-transform:uppercase;
height:35px;
width:85px;
border: 1px solid #5E5E5E;
border-radius:5px;

}

input.quizSubmit[type=”submit”]:hover {
color: #ffffff;
background: #680f11;
text-decoration: none;
}

table {
background-color: #FFFFF;
border:1px solid #BDBDBD;
border-radius:5px;
padding:10px;
padding-left:25px;
box-shadow: rgba(0, 0, 0, 0.498039) 0px 0px 1px 0px;
}

th {

}

tr {

}

td {

}

.submitter {
width:85px;
}

.hide {
display:none;
}

/*SFS light red = #c30b0a;
SFS dark red = #9f2026; */

Ancient History

1.Gaytri Mantra Can be located in?

    Rigveda

    Samaveda

    Yajurveda

    Atharvaveda

2.First Buddhist Counsil held under the Chairmanship of..

    Bindusar

    Ajatshatru

    Bimbsar

    Sabakami

3.In Jainism, Symbol of Lord Mahavira.

    Bull or OX.

    Lion

    Lotus

    Sanke

4. Kalinga War Fought in

    210-211BC

    262-261BC

    236-235BC

    252-251BC

5 .Jaina Literature written in which language?

    Sanskrit

    Pali

    Prakrit

    Urdu

6. Buddhism is devided into.

  1. Hinayana
  2. Mahayana
  3. Vajrayana

    1 and 2 only

    2 only

    1 and 3 only.

    1,2 and 3

7. Excavtor of Mohanjodharo Site.

    MG Majumdar

    Dayaram Sahni.

    YD Sharma

    RD Banerjee

8.Who among the Following scholars were contemporary of Kanishka?

  1. Ashvaghosa
  2. Nagarjuna
  3. Vasumitra
  4. Chanakya

    Both 1 and 2

    Both 3 and 4

    Both 2 and 4

    1,2 and 3

// scripts here:

function submitQuiz() {
console.log(‘submitted’);

// get each answer score
function answerScore (qName) {
var radiosNo = document.getElementsByName(qName);

for (var i = 0, length = radiosNo.length; i < length; i++) { if (radiosNo[i].checked) { // do something with radiosNo var answerValue = Number(radiosNo[i].value); } } // change NaNs to zero if (isNaN(answerValue)) { answerValue = 0; } return answerValue; } // calc score with answerScore function var calcScore = (answerScore('q1') + answerScore('q2') + answerScore('q3') + answerScore('q4') + answerScore('q5') + answerScore('q6') + answerScore('q7') + answerScore('q8')); console.log("CalcScore: " + calcScore); // it works! // function to return correct answer string function correctAnswer (correctStringNo, qNumber) { console.log("qNumber: " + qNumber); // logs 1,2,3,4 after called below return ("The correct answer for question #" + qNumber + ":  ” +
(document.getElementById(correctStringNo).innerHTML) + “
“);
}

// print correct answers only if wrong (calls correctAnswer function)
if (answerScore(‘q1’) === 0) {
document.getElementById(‘correctAnswer1’).innerHTML = correctAnswer(‘correctString1’, 1);
}
if (answerScore(‘q2’) === 0) {
document.getElementById(‘correctAnswer2’).innerHTML = correctAnswer(‘correctString2’, 2);
}
if (answerScore(‘q3’) === 0) {
document.getElementById(‘correctAnswer3’).innerHTML = correctAnswer(‘correctString3’, 3);
}
if (answerScore(‘q4’) === 0) {
document.getElementById(‘correctAnswer4’).innerHTML = correctAnswer(‘correctString4’, 4);
}
if (answerScore(‘q5’) === 0) {
document.getElementById(‘correctAnswer5’).innerHTML = correctAnswer(‘correctString5’, 5);
}
if (answerScore(‘q6’) === 0) {
document.getElementById(‘correctAnswer6’).innerHTML = correctAnswer(‘correctString6’, 6);
}
if (answerScore(‘q7’) === 0) {
document.getElementById(‘correctAnswer7’).innerHTML = correctAnswer(‘correctString7’, 7);
}
if (answerScore(‘q8’) === 0) {
document.getElementById(‘correctAnswer8’).innerHTML = correctAnswer(‘correctString8’, 8);

}

// calculate “possible score” integer
var questionCountArray = document.getElementsByClassName(‘question’);

var questionCounter = 0;
for (var i = 0, length = questionCountArray.length; i < length; i++) { questionCounter++; } // show score as "score/possible score" var showScore = "Your Score: " + calcScore +"/" + questionCounter; // if 4/4, "perfect score!" if (calcScore === questionCounter) { showScore = showScore + "  Perfect Score!
};
document.getElementById(‘userScore’).innerHTML = showScore;
}

$(document).ready(function() {

$(‘#submitButton’).click(function() {
$(this).addClass(‘hide’);
});

});

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here