Subversion Repositories wimsdev

Rev

Rev 5724 | Rev 8512 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

type=first
textarea="explain"
random="x y"
computed="ans"

:A numerical exercise with two random parameters.

The numeric reply is computed with respect to random values of two parameters,
according to various formulas.
<p>
Author of the model: Gang Xiao <qualite@wimsedu.info>

:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%

Remove the above header if you destroy the model tags i.e. the lines starting
with a ':'. Otherwise the exercise might not be recognised by Createxo.

:%%%%%%%% Example parameters to be redefined %%%%%%%%%%%%%%%%%

:\title{Two parameters}
:\author{XIAO, Gang}
:\email{qualite@wimsedu.info}
:\credits{}

:First parameter \x.
\real{x=randint(5..20)*20}

:Second parameter \y.
\real{y=randitem(20,25,30,35,40,60)}

:The computed right answer.
All common functions are recognized. We use \x and \y to
designate the random parameters defined above.
\real{ans=\x*(100-\y)/100}

:Text that explains what should be done.
$embraced_randitem
\text{explain=
A fashion article in a clothes shop costs \x dollars. During a
sales period, the shop offers a reduction of \y percent on the article.
What is the reduced price (in dollars)?
}

:%% Computations; do not modify
\text{explain=wims(embraced randitem \explain)}

:%%%%%%%%%%%%% Now the statement in html. %%%%%%%%%%%%%%%%%%%%

::You don't need to modify this in general.

\statement{\explain
}

:%%%%%%%%%%%%% Nothing to modify after. %%%%%%%%%%%%%%%%%5

\answer{My reply}{\ans}{type=number}