Rev 13704 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
13704 | obado | 1 | type=numbers gapfill |
23 | reyssat | 2 | textarea="explain" |
13704 | obado | 3 | iEdit="explain" |
23 | reyssat | 4 | random="x y" |
5 | computed="ans" |
||
14346 | bpr | 6 | asis="explain" |
23 | reyssat | 7 | |
4135 | bpr | 8 | :A numerical exercise with two random parameters. |
23 | reyssat | 9 | |
10 | The numeric reply is computed with respect to random values of two parameters, |
||
11 | according to various formulas. |
||
11544 | obado | 12 | <p>Author of the model: Gang Xiao <qualite@wimsedu.info></p> |
23 | reyssat | 13 | |
14 | :%%%%%%%%%%%%%%%%% ATTENTION %%%%%%%%%%%%%%%%%%%% |
||
15 | |||
4135 | bpr | 16 | Remove the above header if you destroy the model tags i.e. the lines starting |
17 | with a ':'. Otherwise the exercise might not be recognised by Createxo. |
||
23 | reyssat | 18 | |
19 | :%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%% |
||
20 | |||
21 | :\title{Two parameters} |
||
5147 | bpr | 22 | :\author{XIAO, Gang} |
8002 | bpr | 23 | :\email{qualite@wimsedu.info} |
5724 | bpr | 24 | :\credits{} |
23 | reyssat | 25 | |
26 | :First parameter \x. |
||
27 | \real{x=randint(5..20)*20} |
||
28 | |||
29 | :Second parameter \y. |
||
30 | \real{y=randitem(20,25,30,35,40,60)} |
||
31 | |||
4135 | bpr | 32 | :The computed right answer. |
23 | reyssat | 33 | All common functions are recognized. We use \x and \y to |
34 | designate the random parameters defined above. |
||
35 | \real{ans=\x*(100-\y)/100} |
||
36 | |||
37 | :Text that explains what should be done. |
||
38 | $embraced_randitem |
||
39 | \text{explain= |
||
4135 | bpr | 40 | A fashion article in a clothes shop costs \x dollars. During a |
41 | sales period, the shop offers a reduction of \y percent on the article. |
||
42 | What is the reduced price (in dollars)? |
||
23 | reyssat | 43 | } |
11544 | obado | 44 | |
45 | :Embraced random items |
||
8512 | bpr | 46 | $embraced_randitem |
11544 | obado | 47 | \text{accolade=item(1,1 yes, |
48 | 2 no)} |
||
23 | reyssat | 49 | |
11544 | obado | 50 | :%% Do not modify |
8512 | bpr | 51 | \text{accolade=wims(word 1 of \accolade)} |
52 | \text{explain=\accolade=1 ?wims(embraced randitem \explain)} |
||
23 | reyssat | 53 | |
54 | :%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%% |
||
55 | |||
56 | ::You don't need to modify this in general. |
||
57 | |||
11544 | obado | 58 | \statement{\explain} |
23 | reyssat | 59 | |
60 | :%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5 |
||
61 | |||
62 | \answer{My reply}{\ans}{type=number} |