var result1 = 0;
var gradingSystem = 0;
alert;
var firstName = prompt("Please enter your first name only.");
alert("Lets get started!");
alert;
var answer1 = prompt("1/4 + 3/4 is?");
if (answer1 === "4/4", "1") {
alert("Great! 4/4 or 1 is the answer, " + firstName + "!");
result1 = result1 + 1
} else {
alert("If you have put it 1, please use #/# for your answer, or else its wrong. If you didn't get 4/4 (1 whole) then you might've gotten it wrong.");
result1 = result1 + 0
}
alert("Okay, onto the next question!");
alert;
var answer2 = prompt("Andre has 19 bottles of soap. Andre's friend uses up 7 of the bottles, but he buys 14 more and gives Andre the 14 bottles of soap back. How many bottles of soap does Andre have now? Please just enter the number.");
if (answer2 === "26") {
alert("Yes! Andre has 26 bottles of soap!");
result1 = result1 + 1
} else {
alert("Whoops! Andre actually has 26 bottles of soap. 19 - 7 = 12, 12 + 14 = 26.");
result1 = result1 + 0
}
alert("Next question!");
alert;
var answer3 = prompt("1.25 + .75 is? Please just put in the number. IF it has a decimal, use it. BUT if it is a whole number, leave it at the whole number.");
if (answer3 === "2") {
alert("Yes! The answer is 2! Great job so far!");
result1 = result1 + 1
} else {
alert("Whoops! Nice try, but the answer is actually 2.");
result1 = result1 + 0
}
alert("Okay, this one is 5th grade mathimatical work.");
alert;
var answer4 = prompt("3/6 + 1/2 = ? ");
if (answer4 === "6/6", "1") {
alert("6/6 or 1 is correct, " + firstName);
result1 = result1 + 1
} else {
alert("Incorrect. The answer is 6/6, or 1. Here is the way I do the math: 1/2 x 3 = 3/6 + 3/6 = 6/6 or 1.");
result1 = result1 + 0
}
alert;
var answer5 = prompt("1,285 - 2,000");
if (answer5 === "-715") {
alert("Correct!");
result1 = result1 + 1
} else {
alert("Inncorect. The answer is -715.")
result1 = result1 + 0
}
alert("Next Question!");
alert;
var answer6 = prompt("What does while (true)...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.