Math Teacher

Hi, I am suppost to make a program that teaches students how to do sim

Page 1 of 1

2 Replies - 484 Views - Last Post: 14 May 2009 - 02:29 AM

#1 sandra3743  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 13-May 09

Math Teacher

Post icon  Posted 13 May 2009 - 01:28 PM

<html>
 <!-- mathTeacher.html							  Sandra Magana -->
 <!-- This page teaches you simple arithmetric. -->
 <!----------------------------------------------------------------->
 <head>
   <title>Math Teaching Game</title>
 </head>
 

correctCount=0;
   count=0; 
 
 <script type="text/javascript">
  var operand1, operation, operand2, result
 function addition()
 {
   operand1;
   operand2;
   result;
   result= operand1 + operand2
   document.getElementById('operand1');
   document.getElementById('operand2');
   document.write(operand1 + "plus" + operand2 + "equal" + result);
	

 }
 
 function subtraction()
 
  operand1= document.getElementById("operand1").value;
  operation= document.getElementById("operation").value;
  operand2= document.getElementById("operand2").value;
  result= document.getElementById("result").value;
  document.getElementById("result").value = result;
  
  function multiplication(operand1, operand2)
  {
  result= operand1 * operand2
  {
	return (result)
   }
  } 
  function division()
 
  operand1= document.getElementById("operand1").value;
  operation= document.getElementById("operation").value;
  operand2= document.getElementById("operand2").value;
  result= document.getElementById("result").value;
  document.getElementById("result").value = result;
 
	
   
</script>
<body>
 <p><big> What is: </big> </p>
 
 </body>
<input type="text" id="operand1" size="10" value="" />
<input type="text" id="operation" size="10" value="" />
<input type="text" id="operand2" size="10" value="" />
<input type="text" id="result" size="10" value="" />
<br><input type="button" value="Check Your Answer" onclick="addition();" />
</br>
<p> Number of operations: <input type="text" id="numberofoperation" size="10" value"" />
 </body>
</html>



//this is all i have it doesn't work and I am totally lost...Its due by 3 pm can I get any help please

Mod Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: Math Teacher

#2 crazyjugglerdrummer  Icon User is offline

  • GAME OVER. NERD WINS.
  • member icon

Reputation: 119
  • View blog
  • Posts: 690
  • Joined: 07-January 09

Re: Math Teacher

Posted 13 May 2009 - 04:58 PM

What errors are you encountering? I would suggest you get the data from two textboxes with the numbers in them, and then have a set of radio buttons where they choose the operation. They click a button, and it gives the textbox values to the corresponding operation function. :D
Was This Post Helpful? 0
  • +
  • -

#3 noorahmad  Icon User is offline

  • Untitled
  • member icon

Reputation: 209
  • View blog
  • Posts: 2,290
  • Joined: 12-March 09

Re: Math Teacher

Posted 14 May 2009 - 02:29 AM

can you Past you error here please.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1