Multiple choice exercises are particulary interesting when the syntax of the answer is to complicated for Input Boxes. Next applet deals about the sign of a first degree function. You can show the options is a nice table and randomize the exercise using points as Check Boxes. Se how it works and try it yourself following the construction steps.
The table showing the sign of the function is created with the command [b]TableText[][/b]. You can read more about it in the [url=https://wiki.geogebra.org/en/TableText_Command]manual[/url]. [br]Here's how you can create the two tables using the command TableText[], typed in the input bar.[br][list][*]Each of the two rows of the table is written as a list with elements seperated by a comma.[br][/*][*]at the end you can specify the layout of the table with c indicating that elements are centered.[/*][*]| summarizes which vertical lines of the table are shown (1) and which are not (0)[/*][*]_ summarizes which horizontal lines of the table are shown (1) and which are not (0)[/*][/list]
[table][tr][td]1 [/td][td][/td][td]Type the command [b]lista = Shuffle[{-3, -2, -1, 1, 2, 3}][/b] to create a list.[/td][/tr][tr][td]2-3[/td][td][/td][td]Type the commands [b]a =lista(1)[/b] to create a number a and[br][b]b = RandomBetween[-4, 4][/b] to create a number b.[/td][/tr][tr][td]4[/td][td][/td][td]Type the command [b]f(x) = Polynomial[a x + b][/b] to create the function f.[/td][/tr][tr][td]5[/td][td][/td][td]Type the command [b]sol = [/b][b]If[a > 0, 1, 2][/b] to define som condintionally.[br]If a > 0 then sol = 1, if not sol = 2.[/td][/tr][tr][td]6-7[/td][td][icon]/images/ggb/toolbar/mode_point.png[/icon][/td][td]Select the Text Tool and click twice in the Graphics to create the points A and B.[/td][/tr][tr][td]8[/td][td][/td][td]Type the command [b]ans = 0[/b] to create a number ans.[/td][/tr][tr][td]9[/td][td][icon]/images/ggb/toolbar/mode_buttonaction.png[/icon][/td][td]Select the Button Tool with caption [b]next exercise[/b] and scripting commands[br][b]UpdateConstruction[][/b] to recalculate all random objects[br][b]SetValue[ans,0][/b] to reset the value of ans to 0[br][b]SetPointStyle[A, 2][/b] to uncheck the points A and B[br][b]SetPointStyle[B, 2][/b][br][b]SetColor[A, "blue"] [/b] to color the points A and B blue.[br][b]SetColor[B, "blue"][/b][/td][/tr][tr][td]10[/td][td][icon]/images/ggb/toolbar/mode_text.png[/icon][/td][td]Select the Text Tool and type the dynamic text of the exercise and chose f in the list of available objects.[/td][/tr][tr][td]11-12[/td][td][/td][td]Create the two Sign Tables as explained before.[/td][/tr][/table]