Empty Input Boxes can be used to insert the coordinates of a point in the same way as to type the result of a calculation. You only have to respect the appropriate syntaxes for points. In this worksheet we show the difference. Additionally we'll show some aternative ways to deal with randon numbers.
[*][b]parameters of parabola y = a (x - p)² + q[/b]: [br]- factor a: Define the number a as a random number between -2 and 2 except 0 with the commands:[br] [code]lista = Shuffle({-2, -1, 1, 2})[/code] and [code][/code][code]a = lista(1)[br][/code]- p and q: Define [code]p = RandomBetween(-4, 4)[/code] and [code]q = RandomBetween(-4, 4)[/code].[/*][*][b]Solution[/b]: define a point [i]Sol[/i] by using a capital to make sure it is a point and not a vector![br][code]Sol = (p, q)[/code][br][/*][*][b]The equation[/b]: We'll show the equation of the parabola in the form ax² + bx + c.[br]Define [code]f(x) = Polynomial(a (x - p)²[/code][code] + q)[/code] and use f in a dynamic text to show the equation of the parabola in the form ax² + bx + c.[br][/*][*][b]Answer[/b]: define a number Ans to use as anwer and give it a value, that's certainly not the solution.[br]Ans = (pi, pi). Again use a capital![br][br][/*][*][b][br][/b]The rest goes exactly the same as when working with numbers instead of points. [/*]