| … | |
… | |
| 13 | |
13 | |
| 14 | TEXT(beginproblem()); |
14 | TEXT(beginproblem()); |
| 15 | |
15 | |
| 16 | ########################################################## |
16 | ########################################################## |
| 17 | # |
17 | # |
| 18 | # Use Numeric context |
18 | # The setup |
| 19 | # |
19 | # |
| 20 | |
20 | |
| 21 | Context('Numeric'); |
21 | Context('Numeric'); |
| 22 | |
22 | |
| 23 | $a = Real(random(2,6,1)); |
23 | $a = Real(random(2,6,1)); |
| … | |
… | |
| 28 | ########################################################## |
28 | ########################################################## |
| 29 | # |
29 | # |
| 30 | # The problem text |
30 | # The problem text |
| 31 | # |
31 | # |
| 32 | |
32 | |
|
|
33 | Context()->texStrings; |
| 33 | BEGIN_TEXT |
34 | BEGIN_TEXT |
|
|
35 | |
| 34 | Suppose the legs of a triangle are of length \(\{$a->TeX\}\) and |
36 | Suppose the legs of a triangle are of length \($a\) and \($b\).$BR |
| 35 | \(\{$b->TeX\}\).$BR |
|
|
| 36 | Then the hypoteneuse is of length \{ans_rule(20)\}. |
37 | Then the hypoteneuse is of length \{ans_rule(20)\}. |
|
|
38 | |
| 37 | END_TEXT |
39 | END_TEXT |
|
|
40 | Context()->normalStrings(); |
| 38 | |
41 | |
| 39 | ########################################################### |
42 | ########################################################### |
| 40 | # |
43 | # |
| 41 | # The answer |
44 | # The answer |
| 42 | # |
45 | # |