OEF Exercise - Résolution d'une inéquation de degré 1

Résolution d'une inéquation de degré 1
GNU GPL
Algebra
  • H2
inéquation degré 1 résoudre tester

Inéquations de degré 1

Inéquations de la forme type x +- a < b ou ax < b

Il faut résoudre, puis tester en fournissant un nombre qui est solution, puis un nombre qui ne l'est pas.

\title{Inéquations de degré 1 (I)}
\language{fr}
\range{-5..5}
\author{Odile Bénassy}
\email{obenassy@free.fr}
\computeanswer{no}
\format{html}
\precision{10000}

\integer{numexo=random(1..2)}
\text{x=randomitem(a,k,t,x,y,z)}
\real{a=random(.5,1,1.5,2,2.5,3,3.5,4,5,6,7,8,9,10,12,15,20)}
\real{b=random(.5,1,1.5,2,2.5,3,3.5,4,5,6,7,8,9,10,12,15,20)}
\text{sign=random(-,+)}
\integer{ssign=\sign 1}
\integer{way=random(1,2)}
\integer{way=1}

\text{ineqsigns = <,>}
\integer{ineqnum = random(1,2)}
\text{ineqsign = item(\ineqnum, \ineqsigns)} 
\text{notineqsign = wims(listcomplement \ineqsign in \ineqsigns)}
\text{notineqsign = \notineqsign=}
\if{\ineqnum=1}{
\text{ineqtext = plus petit que}
\text{notineqtext = supérieur ou égal à}
}{
\text{ineqtext = plus grand que}
\text{notineqtext = inférieur ou égal à}
}

\text{firsts=\x \sign \a, \a*\x}
\text{seconds=\b, \b}
\text{first=item(\numexo, \firsts)}
\text{afffirst=wims(replace * by in \first)}  
\text{second=item(\numexo, \seconds)}
\text{sols=\b - (\sign \a), \b/\a}
\real{sol=item(\numexo, \sols)}  
\text{ineqrep = \ineqsign}
\if{\way=2}{\text{ineqrep = wims(listcomplement \ineqsign in \ineqsigns)}}
 
\text{cond = \ineqnum=1? \first - \second : \second - \first}
\text{cond2 = wims(replace \x by &#92;reply2 in \cond)}
\text{cond3 = wims(replace \x by &#92;reply3 in \cond)}

\statement{
\if{debug iswordof \oefenv}{<p>numexo=\numexo; way = \way; sign = \sign; first = \first; second = \second; ineqrep=\ineqrep et ineqtext=\ineqtext, sol=\sol<br>f = \f et g=\g<br>ineqsign=\ineqsign, notineqsign=\notineqsign et notineqtext=\notineqtext
<br>cond = \cond et cond2 = \cond2
}

<p>Résoudre l'équation suivante :
<p><center>
\if{\way=1}{\afffirst \ineqsign \second}{\second \ineqsign \afffirst}</center>

<p>Ma réponse : 
<p><center>\x \ineqsign \embed{reply 1,3}</center>
<p><font color=green>Pour vérifier :</font>
<ul>
<li>Donne un exemple de nombre qui <strong>est</strong> solution de l'inéquation :<br>   \embed{r2,5}, car \afffirst = \embed{r4,5} qui est \embed{choice 1} \second 
<li>Et maintenant un exemple de nombre qui <strong>n'est pas</strong> solution de l'inéquation :<br>   \embed{r3,5}, car \afffirst = \embed{r5,5} qui est \embed{choice 2} \second 
</ul>
}

choice{}{\ineqrep}{<,>} 
\answer{}{\sol}{type=numeric}
\answer{}{\reply2}{type=numeric}
\answer{}{\reply3}{type=numeric}
\answer{}{\reply4}{type=numeric}
\answer{}{\reply5}{type=numeric}
\choice{}{\ineqtext}{plus petit que, plus grand que}
\choice{}{\notineqtext}{inférieur ou égal à, supérieur ou égal à}


\if{\ineqsign=<}{
condition{\reply2 doit vérifier l'inéquation}{evalue(\first,\x=\reply2) < \second}
condition{\reply3 ne doit pas vérifier l'inéquation}{evalue(\first,\x=\reply3) >= \second}
}{
condition{\reply2 doit vérifier l'inéquation}{\cond2 < 0}
condition{\reply3 ne doit pas vérifier l'inéquation}{\cond3 >= 0}
}
2004-05-24 17:49:04
2005-02-18 06:27:37