First of all...
Before you go any further, try this out:
This activity can be made in three steps with the use of random numbers, piecewise functions, and capture. If you are familiar with these you can skip to the end and see how its put together. Click here to skip.
Create Your Activity:
Quick Note on Timing:
If you want a new problem only when a correct answer is given use the correct answer total. You'll need to make sure the value of that variable is zero before the answer is submitted once.