Random Dummy Quiz 

This is a random number: 
This is another random number: 
This is the addition of them both

This is a random number a: 
This is another random number b: 
This is another random number c: 
What is (a+b)*c ?  

This is a random number a:       
This is another random number b :   
Calculate a+(b*b)* p 

This is a random number:     This is another random number:     b / a = text can flow if you are careful.

Press the button to check your answers:

Put random numbers in with this JavaScript: 
   
<script language="javascript">
    write_random(1,10)
    </script>
Where the two digits indicate the range of random numbers to choose from

An alternative random script looks like this
    <script language="javascript">
    write_random_round(10,100,10)
    </script>
In this case the last digit rounds the random number to the nearest 10

Every time you include this script somewhere in the JavaScript a new variable is set up called "a", then the next time called "b" and so on up to a maximum of "e" for each question.  The variables are reset to "a" again when you include a textbox and an associated answer starting with the code $$? which alerts answercheck to your use of random numbers.

The answercheck engine should be able to handle most JavaScript math objects  Answers should be quoted to 2 decimal places.  In the answer file the answers are quoted like this e.g. A[1] = "$$?(a+b)"

To find out where to put the random JavaScript code in the source code so that it's nicely formatted on the page I tend to type up the page as normal and where I want the random numbers I'll type something odd like ****** so I can search and replace it in the source code.