Subversion Repositories wimsdev

Rev

Rev 12170 | Rev 13481 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11375 bpr 1
type=order
12170 mquerol 2
textarea="instruction data1 data2 data3 data4 data5"
4375 bpr 3
 
12170 mquerol 4
:Fer una paraula amb les lletres
5
Es poden introduir fins a 5 llistes de paraules.
6
Cada vegada es pren una paraula aleatòria de cada llista. Una indicació
7
es pot posar per a cada paraula.
4375 bpr 8
<p>
12170 mquerol 9
<span class="wims_warning">$wims_name_warning</span>. Heu de verificar
10
que altres paraules no són factibles amb les mateixes lletres
13476 obado 11
o posar una indicació que permeti diferenciar.</p>
12
<p class="wims_credits">
12170 mquerol 13
Autor del model: Bernadette Perrin-Riou <bpr@math.u-psud.fr>
4375 bpr 14
</p>
15
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
16
 
17
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
18
(Ce sont les lignes qui commencent par un ':'.)
19
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
20
 
21
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
22
 
12170 mquerol 23
:\title{Barreja de lletres}
5147 bpr 24
:\author{Bernadette, Perrin-Riou}
4375 bpr 25
:\email{bpr@math.u-psud.fr}
12170 mquerol 26
:\credits{}
4375 bpr 27
 
12170 mquerol 28
:Enunciat
4375 bpr 29
\text{instruction=Composer un mot avec toutes les lettres proposées.}
30
 
12170 mquerol 31
:Nombre de paraules (màxim 5)
32
El nombre de paraules ha de ser inferior a 5 i inferior al nombre de llistes
33
completat a continuació.
4375 bpr 34
\integer{N=3}
35
 
12170 mquerol 36
:Primera llista de paraules
37
Introduïu una paraula (o grup de paraules) per línia, possiblement seguit d'una indicació. Si ho és
38
d'un grup de paraules, reemplaça l'espai amb  <span class="tt">_</span>.
4375 bpr 39
\text{data1=bille, un jeu
12170 mquerol 40
domino,un jeu
41
jeu_de_dames,un jeu}
13476 obado 42
 
12170 mquerol 43
:Segona llista de paraules
4375 bpr 44
\text{data2=enfant
45
mère
46
père}
13476 obado 47
 
12170 mquerol 48
:Tercera llista de paraules
4375 bpr 49
\text{data3=maison
50
immeuble
51
villa
52
habitation
53
}
13476 obado 54
 
12170 mquerol 55
:Quarta llista de paraules
4375 bpr 56
\text{data4=}
13476 obado 57
 
12170 mquerol 58
:Cinquena llista de paraules
4375 bpr 59
\text{data5=}
60
 
61
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
62
\matrix{data1=\data1}
63
\text{mot1=wims(nonempty items \data1[;1])}
64
\text{mot1=items(\mot1)>=2 ? shuffle(\mot1)}
65
\text{mot1=\mot1[1]}
66
\text{indication1=wims(select \data1 where column 1 issametext \mot1)}
67
\text{indication1=\indication1[2]}
68
\text{indication1=\indication1 issametext ? xxx}
69
\text{mot=\mot1}
70
\matrix{indication=\indication1}
71
\matrix{data2=\data2}
72
\text{mot2=wims(nonempty items \data2[;1])}
73
\text{mot2=items(\mot2)>=2 ? shuffle(\mot2)}
74
\text{mot2=\mot2[1]}
4734 bpr 75
\if{\mot2!=}{
4375 bpr 76
 \text{indication2=wims(select \data2 where column 1 issametext \mot2)}
77
 \text{indication2=\indication2[2]}
78
 \text{indication2=\indication2 issametext ? xxx}
79
 \text{mot=wims(append item \mot2 to \mot)}
80
 \matrix{indication=wims(append line \indication2 to \indication)}
81
}
82
\matrix{data3=\data3}
83
\text{mot3=wims(nonempty items \data3[;1])}
84
\text{mot3=items(\mot3)>=2 ? shuffle(\mot3)}
85
\text{mot3=\mot3[1]}
4734 bpr 86
\if{\mot3!=}{
4375 bpr 87
  \text{indication3=wims(select \data3 where column 1 issametext \mot3)}
88
  \text{indication3=\indication3[2]}
89
  \text{indication3=\indication3 issametext ? xxx}
90
  \text{mot=wims(append item \mot3 to \mot)}
91
  \matrix{indication=wims(append line \indication3 to \indication)}
92
}
93
 
94
\matrix{data4=\data4}
95
\text{mot4=wims(nonempty items \data4[;1])}
96
\text{mot4=items(\mot4)>=2 ? shuffle(\mot4)}
97
\text{mot4=\mot4[1]}
98
\if{\mot4!=}{
99
  \text{indication4=wims(select \data4 where column 1 issametext \mot4)}
100
  \text{indication4=\indication4[2]}
101
  \text{indication4=\indication4 issametext ? xxx}
4734 bpr 102
  \text{mot=wims(append item \mot4 to \mot)}
4375 bpr 103
  \matrix{indication=wims(append line \indication4 to \indication)}
104
}
105
 
106
\matrix{data5=\data5}
107
\text{mot5=wims(nonempty items \data5[;1])}
108
\text{mot5=items(\mot5)>=2 ? shuffle(\mot5)}
109
\text{mot5=\mot5[1]}
110
\if{\mot5!=}{
111
  \text{indication5=wims(select \data5 where column 1 issametext \mot5)}
112
  \text{indication5=\indication5[2]}
113
  \text{indication5=\indication5 issametext ? xxx}
4734 bpr 114
  \text{mot=wims(append item \mot5 to \mot)}
4375 bpr 115
  \matrix{indication=wims(append line \indication5 to \indication)}
116
}
117
 
118
\integer{N1=items(\mot)}
119
\text{bat=shuffle(\N1)}
120
\integer{N=min(\N1,\N)}
121
 
122
\text{mot=\mot[\bat]}
123
\matrix{indication=\indication[\bat;]}
124
\text{mot1=wims(text expand \mot[1] using 01)}
125
\text{mot1=wims(words2items \mot1)}
5271 bpr 126
\text{mot1=wims(replace internal _ by &nbsp; in \mot1)}
4375 bpr 127
 
128
\text{mot2=wims(text expand \mot[2] using 01)}
129
\text{mot2=wims(words2items \mot2)}
5271 bpr 130
\text{mot2=wims(replace internal _ by &nbsp; in \mot2)}
4375 bpr 131
 
132
\text{mot3=wims(text expand \mot[3] using 01)}
133
\text{mot3=wims(words2items \mot3)}
5271 bpr 134
\text{mot3=wims(replace internal _ by &nbsp; in \mot3)}
4375 bpr 135
 
136
\text{mot4=wims(text expand \mot[4] using 01)}
137
\text{mot4=wims(words2items \mot4)}
5271 bpr 138
\text{mot4=wims(replace internal _ by &nbsp; in \mot4)}
4375 bpr 139
 
140
\text{mot5=wims(text expand \mot[5] using 01)}
141
\text{mot5=wims(words2items \mot5)}
5271 bpr 142
\text{mot5=wims(replace internal _ by &nbsp; in \mot5)}
4375 bpr 143
\text{Mot=}
144
\text{STEP=wims(makelist r x for x=1 to \N)}
145
\text{STEP=r1}
146
\nextstep{\STEP}
147
 
148
\statement{
11375 bpr 149
\for{a=1 to \step-1}{
4375 bpr 150
  \if{\a <= \N}{
151
  <div style="font-size:large;padding:6px; margin-left:10px;wdith:50%;
11375 bpr 152
  border: 1px solid #555555;">\Mot[\a;]
4375 bpr 153
  \if{ \indication[\a;] notsametext xxx }{ (\indication[\a;]) }</div>
154
  }
155
}
156
\if{\step <= \N}{
157
\instruction
11375 bpr 158
<div class="wimscenter">\embed{r \step,50 x 50}
4375 bpr 159
\if{ \indication[\step;] notsametext xxx }{
160
(<span style="font-size:large;">\indication[\step;]</span>) }
6132 bpr 161
</div>
4375 bpr 162
}
163
}
164
\answer{}{\mot1}{type=dragfill}{option=nonstop}
165
\answer{}{\mot2}{type=dragfill}{option=nonstop}
166
\answer{}{\mot3}{type=dragfill}{option=nonstop}
167
\answer{}{\mot4}{type=dragfill}{option=nonstop}
168
\answer{}{\mot5}{type=dragfill}{option=nonstop}
169
 
170
\text{Mot=\reply1
171
\reply2
172
\reply3
173
\reply4
174
\reply5}
175
\text{Mot=wims(replace , by in \Mot)}
176
\matrix{Mot=\Mot}
177
\text{STEP=\step <= \N ? r \step:}