Rev 5724 | Rev 8512 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | type=first |
2 | textarea="explain" |
||
3 | random="a b c d" |
||
4 | computed="ans" |
||
5 | |||
4131 | bpr | 6 | :A numerical exercise with 4 random parameters. |
23 | reyssat | 7 | |
8 | The numeric reply is computed with respect to random values of 4 parameters, |
||
9 | according to various formulas. |
||
10 | <p> |
||
8002 | bpr | 11 | Author of the model: Gang Xiao <qualite@wimsedu.info> |
23 | reyssat | 12 | |
13 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
14 | |||
4131 | bpr | 15 | Remove the above header if you destroy the model tags i.e.the lines starting |
16 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
23 | reyssat | 17 | |
18 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
19 | |||
20 | :\title{Four parameters} |
||
5147 | bpr | 21 | :\author{XIAO, Gang} |
8002 | bpr | 22 | :\email{qualite@wimsedu.info} |
5724 | bpr | 23 | :\credits{} |
23 | reyssat | 24 | |
25 | :First parameter \a. |
||
26 | \real{a=randint(-20..20)} |
||
27 | |||
28 | :Second parameter \b. |
||
29 | \real{b=randint(-20..20)} |
||
30 | |||
31 | :Third parameter \c. |
||
32 | \real{c=randint(-20..20)} |
||
33 | |||
34 | :Fourth parameter \d. |
||
35 | \real{d=randint(-20..20)} |
||
36 | |||
4131 | bpr | 37 | :The computed correct answer. |
23 | reyssat | 38 | All common functions are recognized. We use \a, \b, \c, \d to |
39 | designate the random parameters defined above. |
||
40 | \real{ans=(\a)*(\d) - (\b)*(\c)} |
||
41 | |||
42 | :Text that explains what should be done. |
||
43 | Note that the syntax \(...) shows a mathematical formula as it should be. |
||
44 | $embraced_randitem |
||
45 | \text{explain= |
||
46 | Compute the determinant of the matrix \([\a,\b;\c,\d]). |
||
47 | } |
||
48 | |||
49 | :%% Computations; do not modify |
||
50 | \text{explain=wims(embraced randitem \explain)} |
||
51 | |||
52 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
53 | |||
54 | ::You don't need to modify this in general. |
||
55 | |||
56 | \statement{\explain |
||
57 | } |
||
58 | |||
59 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
||
60 | |||
61 | \answer{My reply}{\ans}{type=number} |
||
62 |