Subversion Repositories wimsdev

Rev

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

Rev Author Line No. Line
11501 mquerol 1
type=order
3426 bpr 2
textarea="data"
3
 
12170 mquerol 4
:Cronologia
5
Esdeveniments per ordenar-los cronològicament.
13476 obado 6
<p class="wims_credits">
12170 mquerol 7
Autor del model: Bernadette Perrin-Riou <bpr@math.u-psud.fr>
3426 bpr 8
</p>
9
:%%%%%%%%%%%%%%%%%      ATTENTION      %%%%%%%%%%%%%%%%%%%%
10
 
11
Enlevez l'en-tête ci-dessus si vous détruisez les balises pour le modèle !
12
(Ce sont les lignes qui commencent par un ':'.)
13
Sinon l'exercice risque de ne pas pouvoir repasser sous Createxo.
14
 
15
:%%%%%%%% Paramètres d'exemples à redéfinir %%%%%%%%%%%%%%%%%
12170 mquerol 16
:\title{Cronologia}
5147 bpr 17
:\author{Bernadette, Perrin-Riou}
5744 bpr 18
:\email{}
19
:\credits{}
13476 obado 20
 
12170 mquerol 21
:Enunciat
3426 bpr 22
\text{instruction=Mettre les dates en bas et les événements correspondants sur la ligne du haut.}
13476 obado 23
 
12170 mquerol 24
:Nombre màxim de paraules (màxim 10)
3426 bpr 25
\text{N=5}
13476 obado 26
 
12170 mquerol 27
:Color de la fletxa
3426 bpr 28
\text{couleur=orange}
13476 obado 29
 
12170 mquerol 30
:Amplada de les etiquetes
3426 bpr 31
\text{facteur=100}
13476 obado 32
 
12170 mquerol 33
:Alçada de les etiquetes
3426 bpr 34
\integer{height=100}
13476 obado 35
 
12170 mquerol 36
:Gruix de la fletxa
37
Poseu un enter entre 1 i 3
5744 bpr 38
\integer{wi=1}
13476 obado 39
 
12170 mquerol 40
:Utilitza els dos elements de les dades principals (0), només la primera columna (1), només la segona columna (2), mostra la primera columna i demana la primera columna (3).
3541 bpr 41
\text{choix=0}
13476 obado 42
 
12170 mquerol 43
:Dades principals.
44
Introduïu les dades en l'ordre que haurien d'aparèixer.
3426 bpr 45
\text{data=1515,Bataille de Marignan
46
1680,Création de la Comédie Française
47
1789,Révolution française
48
1830,Les Trois Glorieuses
49
1831,Révolte des Canuts à Lyon
50
1848,Décret abolissant l'esclavage
51
1889,Inauguration de la tour Eiffel à Paris
52
1944,Les femmes acquièrent le droit de vote
53
1981,Abolition de la peine de mort}
54
 
12170 mquerol 55
:S'accepta text aleatori posat entre claus
56
$embraced_randitem
57
\text{accolade=item(1,1 sí,
58
2 no)}
59
 
3426 bpr 60
:%%%%%%%%%%%%%% Rien à modifier ensuite %%%%%%%%%%%%%%%%
12170 mquerol 61
\text{accolade=wims(word 1 of \accolade)}
3426 bpr 62
\real{M=\N-0.3}
63
\text{xrange=-1,\N+1}
12170 mquerol 64
\text{yrange=\choix iswordof 0 ? -5,5:-2,5}
3541 bpr 65
\text{yrange=\choix=1 ? -5,2}
12170 mquerol 66
\text{yrange=\choix=3 ? -5,4}
3426 bpr 67
\text{cnt=rows(\data)}
68
\text{shu=shuffle(\cnt)}
69
\text{shu=\shu[1..\N]}
70
\text{shu=wims(sort numeric item \shu)}
71
\text{data=row([\shu],\data)}
12170 mquerol 72
\text{data=\accolade=1 ? wims(embraced randitem \data)}
3426 bpr 73
\matrix{rep=\data}
74
\integer{size=(1.5*\facteur)*(\M+1)}
75
\integer{height2=4*\height}
76
\text{size=\size,\height2}
77
\text{fleche=xrange \xrange
78
yrange \yrange
5744 bpr 79
lines \couleur,\M,\wi/2,-1,\wi/2,-1,-\wi/2,\M,-\wi/2,\M,-\wi,\N+0.5,0,\M,\wi,\M,\wi/2
12170 mquerol 80
fill 0,0,\couleur
3426 bpr 81
}
82
 
3541 bpr 83
\text{STEP=\choix=0 ? wims(values x for x=1 to 2*\N)}
84
\text{STEP=\choix=1 ? wims(values 2*x-1 for x=1 to \N)}
12170 mquerol 85
\text{STEP=\choix=2 or \choix=3? wims(values 2*x for x=1 to \N)}
3541 bpr 86
\text{STEP=wims(makelist r x for x in  \STEP)}
3426 bpr 87
\steps{\STEP}
88
\text{positionbas=}
89
\text{positionhaut=}
12170 mquerol 90
\text{positionbas2=}
3426 bpr 91
\for{j=0 to \N-1}{
12170 mquerol 92
  \text{fleche=\choix=0 or \choix=1 or \choix=3 ? \fleche
5744 bpr 93
  line \j-0.1,-\wi/2,\j-0.1,-2*\wi,\couleur}
12170 mquerol 94
  \text{fleche=\choix=0 or \choix=2 or \choix=3? \fleche
5744 bpr 95
  line \j-0.1,\wi/2,\j-0.1,2*\wi,\couleur}
3426 bpr 96
  \text{ans=pari([2*\j+1,2*\j+2])}
12170 mquerol 97
  \text{v=slib(draw/convpixel \j-0.5,-2,\size,\xrange,\yrange,0,pixels)}
98
  \text{positionbas=\positionbas
99
 r\ans[1],\v[1] x \v[2]}
3426 bpr 100
 \text{v=slib(draw/convpixel \j-0.5,-2,\size,\xrange,\yrange,0,pixels)}
12170 mquerol 101
 \text{positionbas2=\positionbas2
102
 r\ans[2],\v[1] x \v[2]}
103
  \text{v=slib(draw/convpixel \j-0.5,4,\size,\xrange,\yrange,0,pixels)}
104
  \text{positionhaut=\positionhaut
3426 bpr 105
r\ans[2],\v[1] x \v[2]}
12170 mquerol 106
 
107
 \text{fleche=\choix=3? \fleche
108
 text black, \j-0.2,3,medium,\data[\j+1;1]}
3426 bpr 109
 }
12170 mquerol 110
  \text{position=\choix=1 or \choix=0? \positionbas}
111
  \text{position=\choix=2 or \choix=0? \position
3426 bpr 112
 \positionhaut}
12170 mquerol 113
 \text{position=\choix=3? \positionbas2}
3426 bpr 114
 \text{urlfleche=draw(\size
115
\fleche)}
12170 mquerol 116
\statement{
117
\instruction
6132 bpr 118
<div class="wimscenter">
3426 bpr 119
\special{imagefill \urlfleche,\size[1]x\size[2],\facteur x \height
120
\position}
6132 bpr 121
</div>
3426 bpr 122
}
3541 bpr 123
 
3426 bpr 124
\answer{}{\rep[1;1]}{type=clickfill}{option=shuffle}
125
\answer{}{\rep[1;2]}{type=clickfill}{option=shuffle}
126
\answer{}{\rep[2;1]}{type=clickfill}{option=shuffle}
127
\answer{}{\rep[2;2]}{type=clickfill}{option=shuffle}
128
\answer{}{\rep[3;1]}{type=clickfill}{option=shuffle}
129
\answer{}{\rep[3;2]}{type=clickfill}{option=shuffle}
130
\answer{}{\rep[4;1]}{type=clickfill}{option=shuffle}
131
\answer{}{\rep[4;2]}{type=clickfill}{option=shuffle}
132
\answer{}{\rep[5;1]}{type=clickfill}{option=shuffle}
133
\answer{}{\rep[5;2]}{type=clickfill}{option=shuffle}
134
\answer{}{\rep[6;1]}{type=clickfill}{option=shuffle}
135
\answer{}{\rep[6;2]}{type=clickfill}{option=shuffle}
136
\answer{}{\rep[7;1]}{type=clickfill}{option=shuffle}
137
\answer{}{\rep[7;2]}{type=clickfill}{option=shuffle}
138
\answer{}{\rep[8;1]}{type=clickfill}{option=shuffle}
139
\answer{}{\rep[8;2]}{type=clickfill}{option=shuffle}
140
\answer{}{\rep[9;1]}{type=clickfill}{option=shuffle}
141
\answer{}{\rep[9;2]}{type=clickfill}{option=shuffle}
142
\answer{}{\rep[10;1]}{type=clickfill}{option=shuffle}
11501 mquerol 143
\answer{}{\rep[10;2]}{type=clickfill}{option=shuffle}