Here is a tutorial showing some client-side basics in HTML and Javascript that can test some fairly simple mathematical Areas questions for the user. The inspiration for this came from some homework of a student.
Link to some downloadable HTML programming code … rename to areas.html … and here is a live run link.
You’ll notice heavy use of the Javascript Math.random() function to supply some shape dimensions.
Please note that calculations involving PI would need a final accuracy to 0.01 to be deemed a correct answer. The answer “pork” will not be accepted, alas.
If this was interesting you may be interested in this too.



Revisiting your Worldwide Country Quiz so that the Geo Chart still draws a map even for a small country such as Andorra, and adding Wikipedia images after an answer, keeps the focus on a working world-country quiz rather than only on the surrounding code. I work on World Geography; our world map quiz is a free, untimed browser option for adults and does not need an account. It is another practice link, not a programming tutorial and not a replacement for the Worldwide Country Quiz you are building here.