Répondre à : Récupérer la réponse

Accueil Forums Programmation WIMS Programmation d’exercices OEF Récupérer la réponse Répondre à : Récupérer la réponse

#2044
bernadette
Maître des clés
Up
0
Down
::

Je te laisse comparer et … aller aussi un peu lire la documentation.

\title{ Équation de la tangente }

\author{Lionel Paillet}

\email{ lpaillet@ac-limoges .fr}
\computeanswer{no}

\integer{a=randint(-1,1)}
\integer{a1=randint(1..2)*randint(-1,1)}
\integer{b=randint(0..5)*randint(-1,1)}
\integer{c=randint(0..8)*randint(-1,1)}
\integer{delta=1}
\while{\delta>=0}{
\integer{d=randint(0..8)*randint(-1,1)}
\integer{e=randint(0..8)*randint(-1,1)}
\integer{delta=(\d)^2-4*\e*\a1}
}
\function{num=simplify(\a*x^2+\b*x+\c)}
\text{textnum=texmath(\num)}
\function{den=simplify(\a1*x^2+\d*x+\e)}
\text{textden=texmath(\den)}
\function{f=(\num)/(\den)}
\text{textf=\frac{\textnum}{\textden}}
\integer{xa=randint(-5..5)}
\rational{ya=evalue(\f,x=\xa)}
\function{derf=pari(diff(\f,x))}
\rational{m=evalue(\derf,x=\xa)}
\rational{p=\ya-\m*\xa}
\steps{r1,r2
r3}
\text{dessin=xrange -6,6.01
yrange -6,6.01,
linewidth=1
parallel -6,-6,-6,6,1,0,13,green
parallel -6,-6,6,-6,0,1,13,green
linewidth=3
vline 0,0,black
hline 0,0,black
arrow 0,0,1,0,10,black
arrow 0,0,0,1,10,black
linewidth=2
plot blue,\f
linewidth=10
point \xa,\ya,black}

\statement{
\if{\step=1}{
<div class="float_left spacer">
\draw{601,601}{
 \dessin
}</div>
On donne la fonction \(f) définie sur \(\mathbb{R}) par \(f(x)=\textf)</br>
Sa représentation graphique \(C_f) est donnée ci-dessus.
Déterminer l’équation de la tangente à \(C_f) au point A de coordonnées(\(\xa);\(\ya))
représenté.<br />
\(y=)\embed{r1,5}\(x+)\embed{r2,5}
}
\if{\step=2}{
<div class="float_left spacer">\draw{601,601}{
 \dessin
 linewidth 1
plot red,\reply1*x+\reply2
}
</div>
Votre réponse vous semble-t-elle correcte ?<br />\embed{r3}}
}

\answer{ }{ \m}{type=numexp }{option=nonstop}
\answer{ }{ \p}{type=numexp}{option=nonstop}
\answer{La réponse était correcte }{ \r;oui,non}{type=menu}{option=nonstop}
\if{\m=\reply1 and \p=\reply2}{
  \text{rep=oui}}{
\text{rep=non}
}

\condition{test}{\r issametext \rep}