Subversion Repositories wimsdev

Rev

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

% TOEF 1.0 type1
% This file is automatically generated. Do not edit by hand!
% Generated by WIMS-Createxo toef-generator.

% {
toef_varcnt=20
toef_var1=createQCMtype1et2
toef_var2=Joachim YAMEOGO
toef_var3=yameogo@math.unice.fr
toef_var4=3
toef_var5=(\(f(x)=1-\frac{1}{x+1}))¶(\(f(x)=\sin(\frac{\pi}{\pi x+2})))¶(\(f(x)=1-\ln(\frac{x+1}{x+5})))¶(\(f(x)=1+e^{-x}))
toef_var6=minorée¶majorée¶décroissante¶croissante¶<span style="color:magenta">Choix vide</span>
toef_var7=1,2,4¶1,2,3¶1,2,3¶1,2,3
toef_var8=2
toef_var9=
toef_var10=
toef_var11=
toef_var12=random(2..4)
toef_var13=(la limite de \(f) &nbsp; en \(+\infty))¶(la valeur de \(f) &nbsp; en 0)
toef_var14=(1),(0)¶(0),(1)¶(1),(1+log(5))¶(1),(2)
toef_var15=2, 2
toef_var16=<table style="background-color:lightblue;width:80%">¶  <tr>¶    <td>¶      On considère la fonction réelle \(f) définie sur \(\RR^{+}) par \obj.¶      <p style="background-color:moccasin">¶      Dans la liste suivante, cochez toutes les propiétés vérifiées par la fonction  ¶      \(f) et calculer \fonc.¶      </p>¶    </td>¶  </tr>¶</table>
toef_var17=(1,Dresser un tableau de variation.)¶(1,Etudier le signe de la dérivée sur \(\RR^{+}).)¶(1,Dresser un tableau de variation.)¶(1,Dresser un tableau de variation.)
toef_var18=(1,Utiliser les notes de cours.),(1,Remplacer <em>x</em> par 0 dans la formule.)¶(1,Vers quoi tend \(\sin(\frac{\pi}{\pi x+2}))&#63;),(0,0)¶(1,Utiliser les notes de cours.),(0,0)¶(0,0),(0,0)
toef_var19=checkbox
toef_var20=default,default
!exit
% }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% END  OF  TOEF HEADER %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% The following is OEF %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

## identifiants de l'exercice: titre, auteur et format
\title{
createQCMtype1et2
}
\author{
Joachim YAMEOGO
}
\email{
yameogo@math.unice.fr
}
\langage{fr}
\format{html}
\computeanswer{yes}
\precision{10000}

## type qcm de l'exo
\integer{
exo=
3
}

## la liste des objets mathématiques
\matrix{
obsList=
wims(replace internal ? by &#63; in (\(f(x)=1-\frac{1}{x+1}))
(\(f(x)=\sin(\frac{\pi}{\pi x+2})))
(\(f(x)=1-\ln(\frac{x+1}{x+5})))
(\(f(x)=1+e^{-x})))
}
\integer{obsnb=wims(rowcnt \obsList)}

## la liste des proriétés éventuelles
\matrix{
propsList=
wims(replace internal ? by &#63; in minorée
majorée
décroissante
croissante
<span style="color:magenta">Choix vide</span>)
}
\integer{propsnb=wims(rowcnt \propsList)-1}

## liste des bonnes réponses par objet
\matrix{
propsrepList=
wims(replace internal ? by &#63; in 1,2,4
1,2,3
1,2,3
1,2,3)
}

## nombre de possibilités à afficher
\integer{
ckchnb=
2
}
\integer{
fixchnb=

}
\integer{
borng=

}
\integer{
bornd=

}
\integer{
chnb=
random(2..4)
}

## la liste des fonctions
\matrix{
foncsList=
wims(replace internal ? by &#63; in (la limite de \(f) &nbsp; en \(+\infty))
(la valeur de \(f) &nbsp; en 0))
}
\integer{foncsnb=wims(rowcnt \foncsList)}

## liste des bonnes réponses par objet
\matrix{
foncsrepList=
wims(replace internal ? by &#63; in (1),(0)
(0),(1)
(1),(1+log(5))
(1),(2))
}

## référence pour le type des fonctions
\text{
foncstypList=
2, 2
}

## couleurs de fond
\text{bg=lavender,lemonchiffon,azure}

## nombre de lignes pour l'affichage de 2 colonnes de la liste des propriétés
\integer{rowsnb=floor((\chnb+1)/2)}
\integer{extrarow=((\chnb+1)%2)}

## choix aléatoire d'un objet
\integer{objn=random(1..\obsnb)}
\text{obj=\obsList[\objn;]}
\text{obj=wims(char 2 to -2 of \obj)}

## choix aléatoire d'une fonction
\integer{foncn=random(1..\foncsnb)}
\text{fonc=wims(trim \foncsList[\foncn;])}
\text{fonc=wims(char 2 to -2 of \fonc)}

## la bonne réponse initiale pour les propriétés
\text{props=\propsrepList[\objn;]}

## la bonne solution pour la valeur de la fonction
\text{resu=wims(trim \foncsrepList[\objn;\foncn])}
\text{resu=wims(char 2 to -2 of \resu)}

\text{rep2=<b><span class="bold" style="color:darkcyan">Valeur trouvée:</font></b>}

## génération de la liste des propriétés à afficher
\text{pafnbs=shuffle(\propsnb)}
\text{pafnbs=wims(item 1 to \chnb of \pafnbs)}
## inutile de réordonner avec "text{pafnbs=wims(sort numeric item \pafnbs)}"
\integer{nbp=\propsnb+1}
\text{pafnbs=wims(append item \nbp to \pafnbs)}

\text{paf=}
\for{i in \pafnbs}{
\text{paf=wims(append line \propsList[\i;] to \paf)}
}
\matrix{paf=\paf}

\integer{chnbp=\chnb+1}
\text{propsorder=wims(values i for i=1 to \chnbp)}

## ce qu'il faudra choisir pour avoir juste
\text{brep=wims(listintersect \props and \pafnbs)}
\integer{brepnb=wims(itemcnt \brep)}

\if{\brepnb=0}{
\text{ansrep=\chnbp}}{
\text{ansrep=}
\for{i in \brep}{
\text{situ=position(\i,\pafnbs)}
\text{ansrep=wims(append item \situ to \ansrep)}
}
}
\text{ansrep=wims(sort numeric item \ansrep)}
\text{rep1=Les propriétés de \obj}

## numérotation des éléments des colonnes
\text{c1=wims(values i for i=1 to \rowsnb)}
\text{c2=wims(values \rowsnb+i for i=1 to \rowsnb)}

## énoncé saisi en ligne
\text{
enonceR=
<table style="background-color:lightblue;width:80%">
  <tr>
    <td>
      On considère la fonction réelle \(f) définie sur \(\RR^{+}) par \obj.
      <p style="background-color:moccasin">
      Dans la liste suivante, cochez toutes les propiétés vérifiées par la fonction  
      \(f) et calculer \fonc.
      </p>
    </td>
  </tr>
</table>
}

## toutes les indications pour les propriétés
\matrix{
indicList_obj=
wims(replace internal ? by &#63; in (1,Dresser un tableau de variation.)
(1,Etudier le signe de la dérivée sur \(\RR^{+}).)
(1,Dresser un tableau de variation.)
(1,Dresser un tableau de variation.))
}

## toutes les indications pour les fonctions
\matrix{
indicList_fonc=
wims(replace internal ? by &#63; in (1,Utiliser les notes de cours.),(1,Remplacer <em>x</em> par 0 dans la formule.)
(1,Vers quoi tend \(\sin(\frac{\pi}{\pi x+2}))?),(0,0)
(1,Utiliser les notes de cours.),(0,0)
(0,0),(0,0))
}

## liste des types des fonctions
\text{
type2f=default,default
}
\integer{tyn=1+\foncstypList[\foncn]}
\text{stepvar=reply  1, reply \tyn}
\nextstep{\stepvar}

## lorsqu'il s'agit d'une matrice
\if{\type2f[\foncn]=matrix}{
    \matrix{resu=wims(declosing \resu)}
   }

## détection de l'indication pour l'objet choisi
\text{com=wims(trim \indicList_obj[\objn;])}
\text{com=wims(char 4 to -2 of \com)}
\text{com=wims(trim \com)}
\integer{comN_1=wims(charcnt \com)}

## indication pour la fonction choisie
\text{temp_indic=wims(trim \indicList_fonc[\objn;\foncn])}
\text{temp_indic=wims(char 4 to -2 of \temp_indic)}
\text{temp_indic=wims(trim \temp_indic)}
\integer{comN_2=wims(charcnt \temp_indic)}

## ici on donne l'énoncé de l'exercice
\statement{
\enonceR
<br />
  <table class="wimscenter style="background-color:darkcyan">
    \for{k=1 to \rowsnb}{
    <tr>
      <td style="background-color:\bg[(2*\k-1)%3+1]; text-align:left;">
        <table>
          <tr>
            <td style="background-color:sandybrown">
              \embed{reply 1,\c1[\k]} 
            </td>
            <td>
             \paf[\k;]
            </td>
          </tr>
        </table>
      </td>
      <td style="background-color:\bg[(2*\k)%3+1]; text-align:left;">
        <table>
          <tr>
            <td style="background-color:sandybrown">
              \embed{reply 1,\c2[\k]} 
            </td>
            <td>
             \paf[(\k+\rowsnb);]
            </td>
          </tr>
        </table>
      </td>
    </tr>
    }
    \if{\extrarow<>0}{
    <tr>
      <td style="background-color:\bg[\chnbp%3+1]" colspan="2">
        <table>
          <tr>
            <td style="background-color:sandybrown">
              \embed{reply 1,\chnbp} 
            </td>
            <td> 
              \paf[\chnbp;]
            </td>
          </tr>
        </table>
      </td>
    </tr>
    }
  </table>
  
  <table>
    <tr>
      <td>
        \rep2 
      </td>
      <td>
       \embed{reply \tyn}
      </td>
    </tr>
  </table>

}

## champ de soumission et analyse de la réponse
\reply{\rep1}{\ansrep;\propsorder}{type=checkbox}
\answer{\rep2}{\resu}{type=default}
\answer{\rep2}{\resu}{type=default}
\answer{\rep2}{\resu}{type=default}
\answer{\rep2}{\resu}{type=default}
\answer{\rep2}{\resu}{type=set}
\answer{\rep2}{\resu}{type=fset}
\answer{\rep2}{\resu}{type=vector}
\answer{\rep2}{\resu}{type=function}
\answer{\rep2}{\resu}{type=algexp}
\answer{\rep2}{\resu}{type=formal}
\answer{\rep2}{\resu}{type=matrix}


## indications éventuelles
\hint{
  <div style="background-color:moccasin;width:80%">
  \if{\comN_1>1 and \comN_2>1}{
      <b>A propos des propriétés</b>. \com
      <hr />
      <b>A propos de la valeur à trouver</b>.
      \temp_indic
      }
  
  \if{\comN_1>1 and \comN_2=1}{
      <b>A propos des propriétés</b>. \com
      <hr />
      <b>A propos de la valeur à trouver</b>.
      <font color=magenta><span class="tt">Désolé: il n'y a pas d'indication.</span></font>
      }
      
  \if{\comN_1=1 and \comN_2>1}{
      <b>A propos des propriétés</b>. 
      <font color=magenta><span class="tt">Désolé: il n'y a pas d'indication.</span></font>
      <hr />
      <b>A propos de la valeur à trouver</b>.
      \temp_indic
      }
      
  \if{\comN_1=1 and \comN_2=1}{
      <b>A propos des propriétés</b>. 
      <font color=magenta><span class="tt">Désolé: il n'y a pas d'indication.</span></font>
      <hr />
      <b>A propos de la valeur à trouver</b>.
      <font color=magenta><span class="tt">Désolé: il n'y a pas d'indication.</span></font>
      }
  </div>
      
}

Generated by GNU Enscript 1.6.5.90.