Subversion Repositories wimsdev

Rev

Rev 11003 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11003 Rev 15107
Line 1... Line 1...
1
 
1
 
2
<h3>Examples of interactive exercises under OEF format</h3>
2
<h2>Exemples d'exercices interactifs sous le format OEF</h2>
3
 
3
<p>
4
Here are some exampls of interactive exercises one can create by Createxo.
4
Voici quelques exemples d'exercices interactifs qu'on peut créer par Createxo.
5
<ol>
5
</p><ol>
6
 
-
 
7
<li> <hr style="width:50%"/><b>Length of vector 2D</b>, a simple computation of the length of
6
<li> <b>Longueur de vecteur 2D</b>, un simple calcul de longueur
8
a vector in the plane. Here is the complete source of this exercise.
7
d'un vecteur dans le plan. Voici le source complet de cet exercice.
9
 
-
 
10
<pre>
8
<p>
-
 
9
<textarea id="wims_show" cols="100" rows="15" name="wims_show" readonly="readonly">
11
\title{Norm of vector 2D}
10
\title{Norme de vecteur 2D}
12
\language{en}
11
\language{fr}
13
\computeanswer{no}
12
\computeanswer{no}
14
\format{html}
13
\format{html}
15
 
14
 
16
\integer{x=random(-10..10)}
15
\integer{x=random(-10..10)}
17
\integer{y=random(-10..10)}
16
\integer{y=random(-10..10)}
18
\real{norm=sqrt((\x)^2+(\y)^2)}
17
\real{norm=sqrt((\x)^2+(\y)^2)}
19
\statement{What is the length of the vector (\x,\y) in R<sup>2</sup>?}
18
\statement{Quelle est la longueur du vecteur (\x,\y) dans R<sup>2</sup>?}
20
 
19
 
21
\hint{The length of a vector  (x,y) is equal to
20
\hint{La longueur d'un vecteur (x,y) est égale à sqrt(x^2+y^2).}
22
sqrt(x^2+y^2).}
-
 
23
\answer{The length}{\norm}
21
\answer{La longueur}{\norm}
24
</pre>
22
</textarea>
25
 
23
</p><p>
26
In this exercise, one has defined 2 random integers, x et y, who are the
24
Dans cet exercice, on a défini 2 entiers aléatoires, x et y, qui sont les
27
coordinates of the vector. Then a third parameter, this time real, is defined
25
coordonnées du vecteur. Ensuite un troisième paramètre, cette fois réel, est
28
by the formula of the length. The exercise takes a freestyle reply under the
26
défini par la formule de longueur. L'exercice prend une réponse libre sous le
29
name of ``the length'', and the good reply should be the value of the third
27
nom de ``La longueur'', et la bonne réponse doit être la valeur du troisième
30
parameter``norm''. A hint is prepared in the exercise, which recalls the
28
paramètre ``norm''. Une indication est préparée dans l'exercice, qui rappelle
31
formula of the length. <p>
29
la formule de longueur.
32
You can
30
</p><p>
33
!set parm=oef_answercnt=1&oef_choicecnt=0&oef_title=Norm of vector 2D&oef_format=html&oef_computeanswer=no&level=2&oef_parms=%5Cinteger%7Bx%3Drandom%28-10..10%29%7D%0D%0A%5Cinteger%7By%3Drandom%28-10..10%29%7D%0D%0A%5Creal%7Bnorm%3Dsqrt%28%28%5Cx%29%5E2%2B%28%5Cy%29%5E2%29%7D&oef_statement=What is the length of the vector %28%5Cx%2C%5Cy%29 in R%3Csup%3E2%3C%2Fsup%3E%3F&ansprompt1=The length&ansgood1=%5Cnorm&oef_hint=The length f a vector %28x%2Cy%29 is equal to %0D%0Asqrt%28x%5E2%2By%5E2%29.&oef_solution= $
31
Vous pouvez
34
!href cmd=reply&mode=guided&$parm load this example into the menu
32
!set parm=oef_answercnt=1&oef_choicecnt=0&oef_title=Norme de vecteur 2D&oef_format=html&oef_computeanswer=no&level=2&oef_parms=%5Cinteger%7Bx%3Drandom(-10..10)%7D%0D%0A%5Cinteger%7By%3Drandom(-10..10)%7D%0D%0A%5Creal%7Bnorm%3Dsqrt%28%28%5Cx%29%5E2%2B%28%5Cy%29%5E2%29%7D&oef_statement=Quelle est la longueur du vecteur %28%5Cx%2C%5Cy%29 dans R%3Csup%3E2%3C%2Fsup%3E%3F&ansprompt1=La longueur&ansgood1=%5Cnorm&oef_hint=La longueur d%27un vecteur %28x%2Cy%29 est %E9gale %E0 %0D%0Asqrt%28x%5E2%2By%5E2%29.&oef_solution= $
-
 
33
!href cmd=reply&mode=guided&$parm charger cet exemple dans le menu
35
 to test it. (You can also copy the source into the menu under raw mode.)
34
 pour le tester. (Vous pouvez aussi copier la source dans le menu en mode brut.)
36
 
-
 
37
 
35
</p>
38
</li><li> <hr style="width:50%"/>
-
 
39
<b>Trace of matrix 2x2</b>, computes the trace of a matrix. The question
36
</li><li> <b>Trace de matrice 2x2</b>, calcul de trace d'une matrice. La matrice
40
 is formatted by TeX, for a better presentation of the matrix. Here is
37
 est formatée par TeX, pour une meilleure présentation. Voici
41
 the complete source of the exercise.
38
 le source complet de l'exercice.
42
<pre>
39
<p>
-
 
40
<textarea id="wims_show1" cols="100" rows="15" name="wims_show1" readonly="readonly">
43
\title{Trace of matrix 2x2}
41
\title{Trace de matrice 2x2}
44
\language{en}
42
\language{fr}
45
\computeanswer{yes}
43
\computeanswer{yes}
46
\format{html}
44
\format{html}
47
 
45
 
48
\integer{range=20}
46
\integer{lim=20}
49
\integer{a=random(-\range..\range)}
47
\integer{a=random(-\lim..\lim)}
50
\integer{b=random(-\range..\range)}
48
\integer{b=random(-\lim..\lim)}
51
\integer{c=random(-\range..\range)}
49
\integer{c=random(-\lim..\lim)}
52
\integer{d=random(-\range..\range)}
50
\integer{d=random(-\lim..\lim)}
53
\integer{trace=(\a)+(\d)}
51
\integer{trace=(\a)+(\d)}
54
\statement{Compute the trace of the matrix
52
\statement{Calculer la trace de la matrice
55
\([\a,\b;\c,\d]\).}
53
\([\a,\b;\c,\d]\).}
56
 
54
 
57
\answer{The trace}{\trace}
55
\answer{La trace}{\trace}
-
 
56
</textarea>
58
</pre>
57
</p><p>
59
We have first defined an integer ``range'', to be used to bound the
58
On a d'abord défini un entier <span class="tt">lim</span> qui permettra d'encadrer les
60
random values a,b,c,d which are the elements of the matrix. And the trace is
59
valeurs aléatoires a, b, c, d qui sont les éléments de la matrice. La trace
61
of course defined by the sum of the elements on the diagonal. Please take
60
est définie par la somme des éléments sur la diagonale. Faites
62
care to the definition <span class="tt">trace=(\a)+(\d)</span>: the pairs of parentheses
61
attention à la définition <span class="tt">trace=(\a)+(\d)</span>: les paires de parenthèses
63
are necessary, for the substitution is literary. If you define
62
sont nécessaires, car la substitution est littérale. Si on définit <span class="tt">trace=\a+\d</span>
64
<span class="tt">trace=\a+\d</span> and if a and d take the values of 3 and -15 respectively,
63
et si a et d prennent les valeurs de 3 et -15 respectivement, on aurait
65
you woule have <span class="tt">trace=3+-15</span>, a bad mathematical expression. <p>
64
<span class="tt">trace=3+-15</span>, ce qui est une mauvaise expression mathématique.
-
 
65
</p><p>
66
Remark that in this exercise, the non-computed replies are admitted
66
Remarquons que dans cet exercice, les réponses non calculées sont admises
67
(such as 2+15 or 3*105). <p>
67
(telles 2+15 ou 3*105).
68
You can
68
</p><p>
69
!set parm=oef_answercnt=1&oef_choicecnt=0&oef_title=Trace of matrix 2x2&oef_format=html&oef_computeanswer=yes&level=2&oef_parms=%5Cinteger%7Brange%3D20%7D%0D%0A%5Cinteger%7Ba%3Drandom%28-%5Crange..%5Crange%29%7D%0D%0A%5Cinteger%7Bb%3Drandom%28-%5Crange..%5Crange%29%7D%0D%0A%5Cinteger%7Bc%3Drandom%28-%5Crange..%5Crange%29%7D%0D%0A%5Cinteger%7Bd%3Drandom%28-%5Crange..%5Crange%29%7D%0D%0A%5Cinteger%7Btrace%3D%28%5Ca%29%2B%28%5Cd%29%7D&oef_statement=Compute the trace of the matrix \\([\a,\b;\c,\d]\\).&ansprompt1=The trace&ansgood1=%5Ctrace&oef_hint= &oef_solution= $
69
Vous pouvez
70
!href cmd=reply&mode=guided&$parm load this example into the menu
70
!set parm=oef_answercnt=1&oef_choicecnt=0&oef_title=Trace de matrice 2x2&oef_format=html&oef_computeanswer=yes&level=2&oef_parms=%5Cinteger%7Blim%3D20%7D%0D%0A%5Cinteger%7Ba%3Drandom(-%5Clim..%5Clim)%7D%0D%0A%5Cinteger%7Bb%3Drandom(-%5Clim..%5Clim)%7D%0D%0A%5Cinteger%7Bc%3Drandom(-%5Clim..%5Clim)%7D%0D%0A%5Cinteger%7Bd%3Drandom(-%5Clim..%5Clim)%7D%0D%0A%5Cinteger%7Btrace%3D%28%5Ca%29%2B%28%5Cd%29%7D&oef_statement=Calculer la trace de la matrice \\([\a,\b;\c,\d]\\).&ansprompt1=La trace&ansgood1=%5Ctrace&oef_hint= &oef_solution= $
-
 
71
!href cmd=reply&mode=guided&$parm charger cet exemple dans le menu
71
 to test it. (You can also copy the source into the menu under raw mode.)
72
 pour le tester. (Vous pouvez aussi copier la source dans le menu en mode brut.)
72
 
73
</p>
73
</li>
74
</li>
74
</ol>
75
</ol>
75
 
-