sign of a first degree function
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.
command TableText[]
The table showing the sign of the function is created with the command TableText[]. You can read more about it in the manual.
Here's how you can create the two tables using the command TableText[], typed in the input bar.
- Each of the two rows of the table is written as a list with elements seperated by a comma.
- 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)
Try it yourself...
Construction Steps
1 | | Type the command lista = Shuffle[{-3, -2, -1, 1, 2, 3}] to create a list. |
2-3 | | Type the commands a =lista(1) to create a number a and b = RandomBetween[-4, 4] to create a number b. |
4 | | Type the command f(x) = Polynomial[a x + b] to create the function f. |
5 | | Type the command sol = If[a > 0, 1, 2] to define som condintionally. If a > 0 then sol = 1, if not sol = 2. |
6-7 | | Select the Text Tool and click twice in the Graphics to create the points A and B. |
8 | | Type the command ans = 0 to create a number ans. |
9 | | Select the Button Tool with caption next exercise and scripting commands UpdateConstruction[] to recalculate all random objects SetValue[ans,0] to reset the value of ans to 0 SetPointStyle[A, 2] to uncheck the points A and B SetPointStyle[B, 2] SetColor[A, "blue"] to color the points A and B blue. SetColor[B, "blue"] |
10 | | Select the Text Tool and type the dynamic text of the exercise and chose f in the list of available objects. |
11-12 | | Create the two Sign Tables as explained before. |