redefining the exercise

redefining the random numbers

The command UpdateConstruction() recalculates all random defined objects in the applet, creating a new exercise. You can put this command as a script in a button. Select the Button Tool in the Toolbar and create a button with as caption new exercise and GeoGebra Script UpdateConstruction().

Sum of two random numbers

This first applet shows two random defined numbers in a dynamic text and a button with a script to recalculate the numbers. See how it works and follow the steps to create it yourself.

Construction Steps

1Type following two commands in the inputbar and define the numbers a and b: a = RandomBetween(1,10) b = RandomBetween(1,10)
2Toolbar ImageSelect the Text Tool and type the text a + b, while selecting a and b in the list of objects, making the text dynamic.
3Toolbar ImageSelect the Button Tool. Type new exercise as caption and UpdateConstruction() as script.

Try it yourself...