Computing: Website and Database Programming

Educational application for kids: Arithmetic baubles.


1. Aim of Arithmetic baubles. Lernanwendung für Kinder: Arithmetische Spielereien (deutsche Version dieser Seite)
 
Arithmetic baubles is intended for primary school pupils. It's a basic arithmetic exercise generator, that generates questions that aren't simple calculation expressions, but text-based problems. The aim of the application is to help pupils with the following features (improving their skills in both logical reasoning and calculations):
  • Attentively reading and understanding a text-based calculation problem.
  • Thinking logically and applying this to the problem to solve.
  • Basic arithmetic operations (with numbers up to 100).
  • Calculating with fractions (halfs, thirds, fourths, fifths).
2. My Arithmetic baubles online application.
 
My Arithmetic baubles online application is easy to use: Push the Start button to start the assignment. This will display a first question. Enter the number that you think being the correct answer and push the Antwort (answer) button. The program will check your answer and inform you if it is correct or false; in the latter case, the correct answer will be displayed. To make the program display the next question, push the Frage (question) button.
The number of questions asked is set to 20. When all questions are done, an evaluation score (percentage of correctly answered questions) is displayed. To do another assignment, push Start again.
Use the following link to start the online application. Please, note that the application, in particular the text of the questions, is in German.
3. The Arithmetic baubles Perl script.
 
My Arithmetic baubles online application is a Perl version of my Lazarus/Free Pascal application Arithmetic problems for primary school pupils. The main program logic is in fact nothing more than a "line by line translation" from Pascal to Perl.
With 99 different types of exercises and several lines of code to create the question text for each problem type plus the main program, the source of arith_baubles.pl is a lot of lines, too long to be published here. You can download the source code, plus all other application files from my site. Remember that this code is entirely free and open source, what means that you may modify it as you like, in particular translate the German text to English or any national language that you want...
Here are some remarks, concerning how the application works:
  • The parameter $action tells the script what to do:
    • init: initialize for a new test.
    • start, frage: generate a new question (first question for start, all other questions for frage).
    • antwort: check user's answer.
  • The test web page is generated by reading a template file and replacing all custom tags (template lines containing a tag start with '#' and all tags are placed between '#' symbols) by the corresponding actual values. What will be displayed on the page depends on the $action parameter, of course. When all questions are done, the score (success percentage) of the test is displayed together with some text depending on it.
  • The test questions are generated by calling the subroutine questionText, that randomly selects one of the 99 available questions. Depending on what is given and what has to be calculated, questionText calls the subroutines questionText1 through questionText5. The whole finally leads to the construction of the question text, that is returned together with the answer (calculation result) to the main program.
  • The question generating subroutines use further subroutines: randomPlace, to get a random place (this is just to not always having the same text); randomCars, to get a random number of cars (the number allowed depending on the actual question type); randomColors, to get random car colors (the colors allowed depending on the actual question type).
If you want to place a link to the application on some other page, include the following into this page's HTML:
<a href="/cgi-bin/arith_bubbles.pl?action=init">Arithmetic Bubbles online application</a>
Note: My Perl script uses the CPAN module Switch, that you'll very probably have to install...

If you find this page helpful or if you like the Arithmetic Bauble web application, please, support me and this website by signing my guestbook.