cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <html>
<head>
<title> God Of War E3 </title>
<!-- Don't Please Remove This Comment This Is Important For Code -->
<!-- Renew Dev -->
<!-- Web Site:  http://www.renewdev.com-->

</head>
</body>

<center>
<form name=quizform>
<input type=button value="Addition" onClick="add()">
<input type=button value="Subtration" onClick="subtract()">
<input type=button value="Multiplication" onClick="multiply()">
<input type=button value="Division" onClick="divide()">
<br>
<br>
<input type="radio" name="arithmetic">Super Easy Level
<input type="radio" name="arithmetic" checked>Intermediate Level
<input type="radio" name="arithmetic">Advance Difficult Level
<br>
<br>
<input type=button value="Check Score" onClick="check()">
<input type=button value="Reset Score" onClick="javascript:correct=0;wrong=0;">
</form>
</center>
</body>
</html>
            
          
!
            
              

 Begin
correct=0;
wrong=0;

function random(maxValue) {
day= new Date();
hour= day.getHours();
min=day.getMinutes();
sec=day.getSeconds();
mili=day.getTime()
return(((hour*3600)+(min*60)+(sec)+mili) % maxValue);
}
function ranom(maxValue) {
day= new Date();
mil=day.getTime();
return((mil) % maxValue);
}

function add() {
if(document.quizform.arithmetic[0].checked)
maxValue=10;
else {
if(document.quizform.arithmetic[1].checked)
maxValue=30;
else {
maxValue=60;
   }
}
numA=random(maxValue);
numB=ranom(maxValue);
numC=numA + numB;
Answer=window.prompt(  numA + "+"  + numB +  " = ", "");
ans();
}
function subtract() {
if(document.quizform.arithmetic[0].checked)
maxValue=10;
else
{if(document.quizform.arithmetic[1].checked)
maxValue=30;
else {
maxValue=60
   }
}
numA=random(maxValue);
numB=ranom(maxValue);
numC=numA - numB;
Answer=window.prompt(  numA + "-"  + numB+  " = ", 0);
ans()
}
function divide() {
if(document.quizform.arithmetic[0].checked)
maxValue=10;
else {
if(document.quizform.arithmetic[1].checked)
maxValue=30;
else {
maxValue=60
   }
}
numA=random(maxValue)+1;
numB=ranom(maxValue)+1;
numC=numA / numB;
numC=Math.round(numC)
window.alert("Please round your answer off:\n"
+".5 or higher rounds one number up\n"
+".4 or lower rounds one number down");
Answer=window.prompt(  numA + "/"  + numB +  " = ", 0);
ans()
}
function multiply() {
if(document.quizform.arithmetic[0].checked)
maxValue=10;
else {
if(document.quizform.arithmetic[1].checked)
maxValue=30;
else {
maxValue=60
   }
}
numA=random(maxValue);
numB=ranom(maxValue);
numC=numA * numB;
Answer=window.prompt(  numA + "*"  + numB +  " = ", 0);
ans();
}
function check() {
if ((correct+wrong) != 0) {
score = "" + ((correct / (correct + wrong)) * 100);
score = score.substring(0,4) + "%";
alert("YOUR SCORE:  " + score + "\n"
+ correct + " correct\n"
+ wrong + " incorrect")
}
else alert("You have not completed any exercises yet.");
}
function ans() {
if (Answer == numC) {
correct++;
msg = "Congratulations, your answer is correct.";
}
else {
wrong++;
msg = "Oops!  " + Answer + " is incorrect.\n\n"
+ "The correct answer was " +numC + ".";
   }
score = "" + ((correct / (correct + wrong)) * 100);
score = score.substring(0,4) + "%";
alert(msg + "\n\nYOUR SCORE:  " + score + "\n"
+ correct + " correct\n"
+ wrong + " incorrect")
}

            
          
!
999px
Loading ..................

Console