4 - Javascript:Functions - Assignment

Computers are playing an increasing role in education. Write a program that will help an elementary-school student learn multiplication. Use Math.random to produce two positive one digit integers. It should then display a question such as "How much is 6 times 7?" in a text field. The student then types the answer into another text field. Your program checks the student's answer. If it is correct, display "Good job! Let's do another." in an alert box, and clears the students answer. If the answer is wrong, display "Sorry, that's not correct. Enter another answer." in an alert box, clear the students answer, and let the student try the same question again repeatedly until the student finally gets it right.

Use three functions. Function one will randomly choose the two numbers and start the action of the test. This should be called initially using onLoad. Function two should write the question to the question text field. Function three should check the students response when the Submit button is clicked, and provide the proper function based on the students response.

This due by the beginning of class in week 5.

I'll have a jump drive you can save it to, or you can email me the page.

50 points.

Table of Contents