order Now

simple math game javascript

I need help by programming a small math game with javascript. I already have the structure on my file that I want, but the program is not working yet.

IDEA OF PROJECT
1. question for an addition between 1 and 100 (random numbers)
2. if correct go to subtraction between 1 and 100, if not repeat and stay on this level
3. continuing the structure with multiplication between 1 and 20
4. followed by division between 1 and 20
5. I want 10 questions and then showing a prompt at the end the shows how many points somebody got
6. time restriction of 4 minutes for the 10 questions

using the following structure, but it needs to be continued

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML>
<HEAD>
<TITLE> Project</TITLE>

let Name = prompt(“Hello, What’s your name?”);
console.log(Name);

let a = Math.floor( Math.random() * 100 + 1 );
let b = Math.floor( Math.random() * 100 + 1 );
let a1 = a+b;

let c = Math.floor( Math.random() * 100 + 1 );
let d = Math.floor( Math.random() * 100 + 1 );
let c1 = c-d;

function begin1 (){
  message3.innerHTML = “”;
  a = Math.floor( Math.random() * 100 + 1 );
  b = Math.floor( Math.random() * 100 + 1 );
  a1 = a+b;
  disappear1.innerHTML = “”;
  message1.innerHTML = a + “
” + “+” +”
” + b + “
” + “____________”;
  message2.innerHTML = ” “;
  }

function submit1(){
    let answer1 = input001.value;
    show001.innerHTML = answer1;
    if (answer1 == a1) {
      message3.innerHTML = “correct”;
      message2.innerHTML = “”;
      message4.innerHTML = ““;
    }
    else{
      message3.innerHTML = “incorrect”;
      message2.innerHTML = “”;
      message4.innerHTML = ““;
    }
}

function question2(){
  a = Math.floor( Math.random() * 100 + 1 );
  b = Math.floor( Math.random() * 100 + 1 );
  a1 = a-b;
  message1.innerHTML = c + “
” + “-” +”
” + d + “
” + “____________”;
  message2.innerHTML = ” “;
  message3.innerHTML = “”;
  show001.innerHTML = “”;
  }

function submit2(){
    let answer1 = input002.value;
    show001.innerHTML = answer1;
    if (answer1 == a1) {
      message3.innerHTML = “correct”;
      message2.innerHTML = “”;
      message4.innerHTML = ““;
    }
    else{
      message3.innerHTML = “incorrect”;
      message2.innerHTML = “”;
      message4.innerHTML = ““;
    }
}

</head>

<BODY>

  <style>
        background-color: lightgrey;
        text-align:center   
  </style>
 
 
 

   

Mental Arithmetic


   

   

   

   

   

   

       
   

</body>
</html>

We are always aiming to provide top quality academic writing services that will surely enable you achieve your desired academic grades. Our support is round the clock!

[order_calculator]