Skip to content
Snippets Groups Projects
Commit ac4def8d authored by Nicolas M. Thiéry's avatar Nicolas M. Thiéry
Browse files

Mise a jours fichiers WIMS automatiques

parent 7539ed1a
No related branches found
No related tags found
No related merge requests found
boucle:Mathieu Clment-Ziza
etat_civil:Mathieu Clment-Ziza
tab1d:Mathieu Clment-Ziza
tab2d:Mathieu Clment-Ziza
test_cond:Mathieu Clment-Ziza
!set exolist =!char 1 to -2 of boucle,etat_civil,tab1d,tab2d,test_cond,
!set titlelist=!char 1 to -2 of Boucle,Etat civil,Tableau 1D,Tableau 2D,Tests,
!set exolist =!char 1 to -2 of boucle,tab1d,tab2d,test_cond,etat_civil,
!set titlelist=!char 1 to -2 of Boucle,Tableau 1D,Tableau 2D,Tests,tat civil,
!set exototal =!itemcnt $exolist
boucle:Boucle
etat_civil:Etat civil
etat_civil:tat civil
tab1d:Tableau 1D
tab2d:Tableau 2D
test_cond:Tests
# This file is automatically generated by Modtool 4.00.
# This file is automatically generated by Modtool 4.05.
# Do not edit by hand.
title=OEF Petits tests de programmation
......@@ -7,11 +7,11 @@ language=fr
category=exercise, oef
domain=informatics
level=U1,U2
keywords=C, programme,boucle,tableau,biology,biologie,program
keywords=C,C++,programme,boucle,tableau,biology,biologie,program
require=pari
scoring=yes
copyright=&copy; 2008 (<a href="COPYING">GNU GPL</a>) 2010 2011
author=Mathieu Clment-Ziza
copyright=&copy; 2008 (<a href="COPYING">GNU GPL</a>) 2010 2011 2014
author=Mathieu, Clment-Ziza
address=clementm@necker.fr
version=1.02
wims_version=4.01f
......@@ -22,4 +22,3 @@ data=
maintainer=Bernadette Perrin-Riou
maintainer_address=bpr@math.u-psud.fr
translation_language=
!set title=Etat civil
!set title=tat civil
!if $wims_read_parm!=$empty
!goto $wims_read_parm
!endif
......@@ -8,8 +8,8 @@ author=Mathieu Cl
email=clementm@necker.fr
ansorder=r
varcnt=36
prevarcnt=35
varcnt=38
prevarcnt=37
postvarcnt=0
replycnt=1
choicecnt=0
......@@ -37,13 +37,13 @@ tmp0=!randitem $tmp
val7=$(tmp0)
!ifval $val7 issametext celibataire
val8=Mademoiselle
val8= Mademoiselle
!else
val8= Madame
!endif
!ifval $val7 issametext celibataire
val9=Madame
val9= Madame
!else
val9= Mademoiselle
!endif
......@@ -65,89 +65,94 @@ tmp=!nonempty items Trucmuche,Trucmachin
tmp0=!randitem $tmp
val13=$(tmp0)
val14=<pre style="background-color:#F0FFFF; color:red;"> #include&#60;stdio.h> #include&#60;string.h> int main(void) { char reponse1[4]; char reponse2[4]; char etat[14]; char nom[30]; printf("Etes vous de sexe masculin ? "); scanf("%s",reponse1); if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"$val10") == 0) strcpy(etat,"Monsieur"); else { printf("Etes-vous $val7 ? "); scanf("%s",reponse2); if (strcmp(reponse2,"oui")==0 || strcmp(reponse2,"$val12")==0) strcpy(etat,"$val8"); else strcpy(etat,"$val9"); } printf("Bonjour %s\n",etat); printf("Quel est votre nom ? "); scanf("%s",nom); printf("Au revoir %s ",etat); puts(nom); return 0; } </pre>
val15=<pre style="background-color:#F0FFFF; color:red"> <b>DEBUT DE PROGRAMME</b> Afficher ("etes vous de sexe masculin") <b>SI</b> reponse est "oui" OU "$val10" Copier la chane "Monsieur" dans etat <b>SINON</b> Afficher ("Etes-vous $val7 ? ") <b>SI</b> reponse est "oui" OU "$val12" Copier la chane "$val8" dans etat <b>SINON </b> Copier la chane "$val9" dans etat <b>Fin SINON</b> Afficher ("Bonjour [etat]") Afficher ("Quel est votre nom ?") Afficher ("Au revoir [etat] [nom]") <b>FIN DE PROGRAMME</b> </pre>
val14=<pre style="background-color:#F0FFFF; color:red;"> #include&#60;stdio.h> #include&#60;string.h> int main(void) { char reponse1[4]; char reponse2[4]; char etat[14]; char nom[30]; printf("tes vous de sexe masculin ? "); scanf("%s",reponse1); if (strcmp(reponse1,"oui") == 0 || strcmp(reponse1,"$val10") == 0) strcpy(etat,"Monsieur"); else { printf("tes-vous $val7 ? "); scanf("%s",reponse2); if (strcmp(reponse2,"oui")==0 || strcmp(reponse2,"$val12")==0) strcpy(etat,"$val8"); else strcpy(etat,"$val9"); } printf("Bonjour %s\n",etat); printf("Quel est votre nom ? "); scanf("%s",nom); printf("Au revoir %s ",etat); puts(nom); return 0; } </pre>
val15=<pre style="background-color:#F0FFFF; color:red;"> #include&#60;iostream> #include&#60;string> using namespace std; int main(void) { string reponse1; string reponse2; string etat; string nom; cout << "tes vous de sexe masculin ? "; cin >> reponse1; if (reponse1 == "oui" or reponse1 == "$val10") { etat = "Monsieur"; } else { cout << "tes-vous $val7 ? "; cin >> reponse2; if ( reponse2 == "oui" or reponse2 == "$val12") etat = "$val8"; else etat = "$val9"; } cout << "Bonjour: " << etat << endl; cout << "Quel est votre nom ? "; cin >> nom; cout << "Au revoir " << etat << " " nom << endl; return 0; } </pre>
val16=<pre style="background-color:#F0FFFF; color:red"> <b>DEBUT DE PROGRAMME</b> Afficher ("tes vous de sexe masculin") <b>SI</b> reponse est "oui" OU "$val10" Copier la chane "Monsieur" dans etat <b>SINON</b> Afficher ("tes-vous $val7 ? ") <b>SI</b> rponse est "oui" OU "$val12" Copier la chane "$val8" dans etat <b>SINON </b> Copier la chane "$val9" dans etat <b>Fin SINON</b> Afficher ("Bonjour [etat]") Afficher ("Quel est votre nom ?") Afficher ("Au revoir [etat] [nom]") <b>FIN DE PROGRAMME</b> </pre>
tmp=!trim non,non,$val13 non,NON,$val13 non,oui,$val13 non,Oui,$val13 non,OUI,$val13 NON,non,$val13 NON,NON,$val13 NON,oui,$val13 NON,Oui,$val13 NON,OUI,$val13 $val10,$val13,0 oui,$val13,0 $val11,non,$val13 $val11,NON,$val13 $val11,oui,$val13 $val11,Oui,$val13 $val11,OUI,$val13
val16=!translate internal $ \
val17=!translate internal $ \
$ to ;; in $tmp
tmp=!translate internal $ $ to ; in $val16
tmp=!translate internal $ $ to ; in $val17
tmp0=!rowcnt $tmp
tmp1=!shuffle $(tmp0)
val17=$(tmp1)
tmp=!trim $(val16[$(val17[1]);])
val18=!translate internal $ \
val18=$(tmp1)
tmp=!trim $(val17[$(val18[1]);])
val19=!translate internal $ \
$ to ;; in $tmp
tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val18[1;1]) $(val18[1;2]) $(val18[1;3])
tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val19[1;1]) $(val19[1;2]) $(val19[1;3])
tmp=!trim $(tmp0)
val19=!translate internal $ \
val20=!translate internal $ \
$ to ;; in $tmp
val20=0
val21=2
!while $val20 < 1
tmp=!trim $(val16[$(val17[$val21]);])
val22=!translate internal $ \
val21=0
val22=2
!while $val21 < 1
tmp=!trim $(val17[$(val18[$val22]);])
val23=!translate internal $ \
$ to ;; in $tmp
tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val22[1;1]) $(val22[1;2]) $(val22[1;3])
tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val23[1;1]) $(val23[1;2]) $(val23[1;3])
val23=$(tmp0)
!if $val23 notsametext $(val19[1;])
val20=$[rint($val20+1)]
tmp=!trim $(val19[1;]);$val23
val19=!translate internal $ \
val24=$(tmp0)
!if $val24 notsametext $(val20[1;])
val21=$[rint($val21+1)]
tmp=!trim $(val20[1;]);$val24
val20=!translate internal $ \
$ to ;; in $tmp
tmp=!trim $(val18[1;]);$(val22[1;])
val18=!translate internal $ \
tmp=!trim $(val19[1;]);$(val23[1;])
val19=!translate internal $ \
$ to ;; in $tmp
!endif
val21=$[rint($val21+1)]
val22=$[rint($val22+1)]
!endwhile
val20=0
!while $val20 < 1
tmp=!trim $(val16[$(val17[$val21]);])
val22=!translate internal $ \
val21=0
!while $val21 < 1
tmp=!trim $(val17[$(val18[$val22]);])
val23=!translate internal $ \
$ to ;; in $tmp
tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val22[1;1]) $(val22[1;2]) $(val22[1;3])
tmp0=!exec bioinfo $val6 $val10 $val12 $val8 $val9 $val7 $(val23[1;1]) $(val23[1;2]) $(val23[1;3])
val23=$(tmp0)
!if $val23 notsametext $(val19[1;]) and $val23 <> $(val19[2;])
val20=$[rint($val20+1)]
tmp=!trim $(val19[1;]);$(val19[2;]);$val23
val19=!translate internal $ \
val24=$(tmp0)
!if $val24 notsametext $(val20[1;]) and $val24 <> $(val20[2;])
val21=$[rint($val21+1)]
tmp=!trim $(val20[1;]);$(val20[2;]);$val24
val20=!translate internal $ \
$ to ;; in $tmp
tmp=!trim $(val18[1;]);$(val18[2;]);$(val22[1;])
val18=!translate internal $ \
tmp=!trim $(val19[1;]);$(val19[2;]);$(val23[1;])
val19=!translate internal $ \
$ to ;; in $tmp
!endif
val21=$[rint($val21+1)]
val22=$[rint($val22+1)]
!endwhile
tmp0=!randint 1, 3
val24=$[rint($(tmp0))]
val25=<b>$(val18[$val24;1])</b>
val25=$val25 puis <b>$(val18[$val24;2])</b>
val25=$[rint($(tmp0))]
val26=<b>$(val19[$val25;1])</b>
val26=$val26 puis <b>$(val19[$val25;2])</b>
!ifval $(val18[$val24;3])!=0
val25= $val25 et enfin <b>$(val18[$val24;3])</b>
!ifval $(val19[$val25;3])!=0
val26= $val26 et enfin <b>$(val19[$val25;3])</b>
!endif
!ifval $val3 issametext algo
val26=$val15
val27=$val16
!else
tmp=!nonempty items $val15,$val14
tmp=!nonempty items $val16,$val14
tmp0=!randitem $tmp
val26=$(tmp0)
val27=$(tmp0)
!endif
!ifval $val3 issametext code
val26=$val14
val27=$val14
!endif
!ifval $val3 issametext code_cpp
val27=$val15
!endif
replytype1=click
replyname1=
replygood1=$val24;A,B,C
replygood1=$val25;A,B,C
question=__EXECUTED_1692754_EXERCISE__
!goto stat
......@@ -155,15 +160,15 @@ question=__EXECUTED_1692754_EXERCISE__
!exit
:question
$() <!-- Enonc--> <p>Lors de l'excution de ce programme, par saisie clavier, l'utitlisateur a rpondu successivement $val25. Quels seront les affichages l'cran? <!-- Tableau : gauche le code C, droite le QCM --> </p> <table border="0" align="center"> <tr> <td> <!-- Affichage du Code C -->
!read oef/special.phtml expandlines $val26
$() </td> <!-- Mis en forme html du QCM --> <td> <table align="center" border="1"> <tr> <td>
$() <!-- Enonc--> <p>Lors de l'excution de ce programme, par saisie clavier, l'utilisateur a rpondu successivement $val26. Quels seront les affichages l'cran? <!-- Tableau : gauche le code C, droite le QCM --> </p> <table border="0" align="center"> <tr> <td> <!-- Affichage du Code C -->
!read oef/special.phtml expandlines $val27
$() </td> <!-- Mis en forme html du QCM --> <td> <table align="center" border="1"> <tr> <td>
!read oef/embed.phtml reply1,1
$() </td> <td> <pre>$(val19[1;])</pre> </td> </tr> <tr> <td>
$() </td> <td> <pre>$(val20[1;])</pre> </td> </tr> <tr> <td>
!read oef/embed.phtml reply1,2
$() </td> <td> <pre>$(val19[2;])</pre> </td> </tr> <tr> <td>
$() </td> <td> <pre>$(val20[2;])</pre> </td> </tr> <tr> <td>
!read oef/embed.phtml reply1,3
$() </td> <td> <pre>$(val19[3;])</pre> </td> </tr> </table> </td> </tr> </table>
$() </td> <td> <pre>$(val20[3;])</pre> </td> </tr> </table> </td> </tr> </table>
$()
!exit
......@@ -196,5 +201,5 @@ $()
!exit
:stat
vsavelist=19,25,26
vsavelist=20,26,27
embedcnt=4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment