Subversion Repositories wimsdev

Rev

Rev 11375 | Rev 13476 | 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
11
o posar una indicació que permeti diferenciar.
4375 bpr 12
<p>
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}
42
:Segona llista de paraules
4375 bpr 43
\text{data2=enfant
44
mère
45
père}
12170 mquerol 46
:Tercera llista de paraules
4375 bpr 47
\text{data3=maison
48
immeuble
49
villa
50
habitation
51
}
12170 mquerol 52
:Quarta llista de paraules
4375 bpr 53
\text{data4=}
12170 mquerol 54
:Cinquena llista de paraules
4375 bpr 55
\text{data5=}
56
 
57
:%%%%%%%%%%%%%% Rien à modifier avant l'énoncé %%%%%%%%%%%%%%%%
58
\matrix{data1=\data1}
59
\text{mot1=wims(nonempty items \data1[;1])}
60
\text{mot1=items(\mot1)>=2 ? shuffle(\mot1)}
61
\text{mot1=\mot1[1]}
62
\text{indication1=wims(select \data1 where column 1 issametext \mot1)}
63
\text{indication1=\indication1[2]}
64
\text{indication1=\indication1 issametext ? xxx}
65
\text{mot=\mot1}
66
\matrix{indication=\indication1}
67
\matrix{data2=\data2}
68
\text{mot2=wims(nonempty items \data2[;1])}
69
\text{mot2=items(\mot2)>=2 ? shuffle(\mot2)}
70
\text{mot2=\mot2[1]}
4734 bpr 71
\if{\mot2!=}{
4375 bpr 72
 \text{indication2=wims(select \data2 where column 1 issametext \mot2)}
73
 \text{indication2=\indication2[2]}
74
 \text{indication2=\indication2 issametext ? xxx}
75
 \text{mot=wims(append item \mot2 to \mot)}
76
 \matrix{indication=wims(append line \indication2 to \indication)}
77
}
78
\matrix{data3=\data3}
79
\text{mot3=wims(nonempty items \data3[;1])}
80
\text{mot3=items(\mot3)>=2 ? shuffle(\mot3)}
81
\text{mot3=\mot3[1]}
4734 bpr 82
\if{\mot3!=}{
4375 bpr 83
  \text{indication3=wims(select \data3 where column 1 issametext \mot3)}
84
  \text{indication3=\indication3[2]}
85
  \text{indication3=\indication3 issametext ? xxx}
86
  \text{mot=wims(append item \mot3 to \mot)}
87
  \matrix{indication=wims(append line \indication3 to \indication)}
88
}
89
 
90
\matrix{data4=\data4}
91
\text{mot4=wims(nonempty items \data4[;1])}
92
\text{mot4=items(\mot4)>=2 ? shuffle(\mot4)}
93
\text{mot4=\mot4[1]}
94
\if{\mot4!=}{
95
  \text{indication4=wims(select \data4 where column 1 issametext \mot4)}
96
  \text{indication4=\indication4[2]}
97
  \text{indication4=\indication4 issametext ? xxx}
4734 bpr 98
  \text{mot=wims(append item \mot4 to \mot)}
4375 bpr 99
  \matrix{indication=wims(append line \indication4 to \indication)}
100
}
101
 
102
\matrix{data5=\data5}
103
\text{mot5=wims(nonempty items \data5[;1])}
104
\text{mot5=items(\mot5)>=2 ? shuffle(\mot5)}
105
\text{mot5=\mot5[1]}
106
\if{\mot5!=}{
107
  \text{indication5=wims(select \data5 where column 1 issametext \mot5)}
108
  \text{indication5=\indication5[2]}
109
  \text{indication5=\indication5 issametext ? xxx}
4734 bpr 110
  \text{mot=wims(append item \mot5 to \mot)}
4375 bpr 111
  \matrix{indication=wims(append line \indication5 to \indication)}
112
}
113
 
114
\integer{N1=items(\mot)}
115
\text{bat=shuffle(\N1)}
116
\integer{N=min(\N1,\N)}
117
 
118
\text{mot=\mot[\bat]}
119
\matrix{indication=\indication[\bat;]}
120
\text{mot1=wims(text expand \mot[1] using 01)}
121
\text{mot1=wims(words2items \mot1)}
5271 bpr 122
\text{mot1=wims(replace internal _ by &nbsp; in \mot1)}
4375 bpr 123
 
124
\text{mot2=wims(text expand \mot[2] using 01)}
125
\text{mot2=wims(words2items \mot2)}
5271 bpr 126
\text{mot2=wims(replace internal _ by &nbsp; in \mot2)}
4375 bpr 127
 
128
\text{mot3=wims(text expand \mot[3] using 01)}
129
\text{mot3=wims(words2items \mot3)}
5271 bpr 130
\text{mot3=wims(replace internal _ by &nbsp; in \mot3)}
4375 bpr 131
 
132
\text{mot4=wims(text expand \mot[4] using 01)}
133
\text{mot4=wims(words2items \mot4)}
5271 bpr 134
\text{mot4=wims(replace internal _ by &nbsp; in \mot4)}
4375 bpr 135
 
136
\text{mot5=wims(text expand \mot[5] using 01)}
137
\text{mot5=wims(words2items \mot5)}
5271 bpr 138
\text{mot5=wims(replace internal _ by &nbsp; in \mot5)}
4375 bpr 139
\text{Mot=}
140
\text{STEP=wims(makelist r x for x=1 to \N)}
141
\text{STEP=r1}
142
\nextstep{\STEP}
143
 
144
\statement{
11375 bpr 145
\for{a=1 to \step-1}{
4375 bpr 146
  \if{\a <= \N}{
147
  <div style="font-size:large;padding:6px; margin-left:10px;wdith:50%;
11375 bpr 148
  border: 1px solid #555555;">\Mot[\a;]
4375 bpr 149
  \if{ \indication[\a;] notsametext xxx }{ (\indication[\a;]) }</div>
150
  }
151
}
152
\if{\step <= \N}{
153
\instruction
11375 bpr 154
<div class="wimscenter">\embed{r \step,50 x 50}
4375 bpr 155
\if{ \indication[\step;] notsametext xxx }{
156
(<span style="font-size:large;">\indication[\step;]</span>) }
6132 bpr 157
</div>
4375 bpr 158
}
159
}
160
\answer{}{\mot1}{type=dragfill}{option=nonstop}
161
\answer{}{\mot2}{type=dragfill}{option=nonstop}
162
\answer{}{\mot3}{type=dragfill}{option=nonstop}
163
\answer{}{\mot4}{type=dragfill}{option=nonstop}
164
\answer{}{\mot5}{type=dragfill}{option=nonstop}
165
 
166
\text{Mot=\reply1
167
\reply2
168
\reply3
169
\reply4
170
\reply5}
171
\text{Mot=wims(replace , by in \Mot)}
172
\matrix{Mot=\Mot}
173
\text{STEP=\step <= \N ? r \step:}