MIC
Pat O'Sullivan
Department of Mathematics and Computer Studies
Mary Immaculate College, Limerick, Ireland

General Information

Student Resources and Information

Interests

A Quiz

As you will see below, the driving procedure is Quiz .
Each question and answer session is a separate procedure which asks a quiz question and checks for the correctness or otherwise of the answer and tells the competitor whether s/he is correct or incorrect.
Each question and answer procedure has a sub-procedure or two which supply audio or graphics associated with the question.

The co-ordinates for the map of France can be worked out by printing a map of France onto a sheet of paper which already has a grid printed on it or by drawing a grid onto a transparency and placing the transparency over a map of France.
The scale factor :s and the positioning co-ordinates :x :y are optional and can be added in after the map co-ordinates have been worked out.

The procedures used are:

to quiz

make "SCORE 0
Dublin
Paris
Obama
Kenny
score

end
to Dublin

cs
flagirl ;this draws an Irish flag
Make "freagra questionbox [Ceist][What is the capital city of Ireland?]
if :freagra =[Dublin] [make "SCORE :SCORE+1 playwave "applause.wav 1 Messagebox [] [ Correct! ] ]
if not :freagra =[Dublin] [playwave "boooo.wav 1 messagebox [][Wrong! Dublin is the capital] ]

end
to Paris

cs
france 1 0 0 ;This draws a map of France.
playwave "marseillaise.wav 1
Make "freagra questionbox [Ceist][What is the capital city of France?]
IF :freagra =[Paris] [make "SCORE :SCORE+1 playwave "applause.wav 1 Messagebox [] [Correct! ]]
if not :freagra =[Paris] [playwave "boooo.wav 1 messagebox [][Wrong! Paris is the capital] ]

end
to obama

cs
gifload "obama.gif
Make "freagra questionbox [Ceist][Who is this world leader?]
if (or :freagra =[Obama] :freagra =[President Obama]) [make "SCORE :SCORE+1 playwave "applause.wav 1 Messagebox [] [Correct!]]
if not (or :freagra =[Obama] :freagra =[President Obama]) [playwave "boooo.wav 1 messagebox [][Wrong! It's President Obama] ]

end
to kenny

cs
bitload "kenny.bmp
Make "freagra questionbox [Ceist][Who is this world leader?]
if (or :freagra =[Enda Kenny] :freagra=[Kenny]) [make "SCORE :SCORE+1 playwave "applause.wav 1 Messagebox [] [Correct! ]]
if not (or :freagra =[Enda Kenny] :freagra=[Kenny]) [playwave "boooo.wav 1 messagebox [][Wrong! It's Enda Kenny] ]

end
to score

cs
messagebox [Score] (se [Your score is ] :SCORE)

end
to flagirl

ht
pole ;the flag pole
move1
green ;the green rectangle
move2
white ;the white rectangle
move2
orange ; the orange rectangle
pu lt 90 fd 140 fd 10 rt 90 bk 195 pd

end
to pole

repeat 2[fd 300 rt 90 fd 10 rt 90]

end
to move1

pu fd 195 rt 90 fd 10 lt 90 pd

end
to green

repeat 2[ fd 105 rt 90 fd 70 rt 90] pu rt 45 fd 20 setfloodcolor [0 177 0] fill pu bk 20 lt 45 pd

end
to move2
pu rt 90 fd 70 lt 90 pd

end
to white
repeat 2[ fd 105 rt 90 fd 70 rt 90] pu rt 45 fd 20 setfloodcolor [255 255 255] fill pu bk 20 lt 45 pd

end
to orange

repeat 2[ fd 105 rt 90 fd 70 rt 90] pu rt 45 fd 20 setfloodcolor [255 180 0] fill pu bk 20 lt 45 pd

end
to france :s :x :y

pu setxy 87 *:s +:x 84 *:s +:y pd
setxy 87 *:s +:x 84 *:s +:y
setxy 74 *:s +:x 104 *:s +:y
setxy 75 *:s +:x 106 *:s +:y
setxy 77 *:s +:x 116 *:s +:y
setxy 72 *:s +:x 124 *:s +:y
setxy 61 *:s +:x 131 *:s +:y
setxy 56 *:s +:x 141 *:s +:y
setxy 57 *:s +:x 145 *:s +:y
setxy 54 *:s +:x 150 *:s +:y
setxy 57 *:s +:x 151 *:s +:y
setxy 57 *:s +:x 155 *:s +:y
setxy 50 *:s +:x 152 *:s +:y
setxy 50 *:s +:x 160 *:s +:y
setxy 45 *:s +:x 166 *:s +:y
setxy 41 *:s +:x 163 *:s +:y
setxy 41 *:s +:x 169 *:s +:y
setxy 36 *:s +:x 171 *:s +:y
setxy 34 *:s +:x 170 *:s +:y
setxy 33 *:s +:x 173 *:s +:y
setxy 29 *:s +:x 176 *:s +:y
setxy 25 *:s +:x 173 *:s +:y
setxy 25 *:s +:x 176 *:s +:y
setxy 22 *:s +:x 173 *:s +:y
setxy 21 *:s +:x 176 *:s +:y
setxy 18 *:s +:x 177 *:s +:y
setxy 22 *:s +:x 181 *:s +:y
setxy 22 *:s +:x 187 *:s +:y
setxy 18 *:s +:x 190 *:s +:y
setxy 17 *:s +:x 191 *:s +:y
setxy 15 *:s +:x 190 *:s +:y
setxy 16 *:s +:x 195 *:s +:y
setxy 18 *:s +:x 195 *:s +:y
setxy 20 *:s +:x 196 *:s +:y
setxy 28 *:s +:x 197 *:s +:y
setxy 36 *:s +:x 199 *:s +:y
setxy 37 *:s +:x 201 *:s +:y
setxy 40 *:s +:x 202 *:s +:y
setxy 41 *:s +:x 198 *:s +:y
setxy 43 *:s +:x 197 *:s +:y
setxy 46 *:s +:x 192 *:s +:y
setxy 48 *:s +:x 191 *:s +:y
setxy 50 *:s +:x 193 *:s +:y
setxy 53 *:s +:x 193 *:s +:y
setxy 56 *:s +:x 191 *:s +:y
setxy 58 *:s +:x 189 *:s +:y
setxy 58 *:s +:x 193 *:s +:y
setxy 62 *:s +:x 191 *:s +:y
setxy 68 *:s +:x 192 *:s +:y
setxy 63 *:s +:x 198 *:s +:y
setxy 66 *:s +:x 203 *:s +:y
setxy 66 *:s +:x 209 *:s +:y
setxy 67 *:s +:x 213 *:s +:y
setxy 63 *:s +:x 217 *:s +:y
setxy 64 *:s +:x 220 *:s +:y
setxy 61 *:s +:x 226 *:s +:y
setxy 66 *:s +:x 222 *:s +:y
setxy 71 *:s +:x 223 *:s +:y
setxy 72 *:s +:x 212 *:s +:y
setxy 75 *:s +:x 213 *:s +:y
setxy 80 *:s +:x 208 *:s +:y
setxy 94 *:s +:x 211 *:s +:y
setxy 101 *:s +:x 213 *:s +:y
setxy 105 *:s +:x 213 *:s +:y
setxy 103 *:s +:x 217 *:s +:y
setxy 101 *:s +:x 219 *:s +:y
setxy 97 *:s +:x 218 *:s +:y
setxy 96 *:s +:x 220 *:s +:y
setxy 116 *:s +:x 233 *:s +:y
setxy 117 *:s +:x 235 *:s +:y
setxy 122 *:s +:x 233 *:s +:y
setxy 124 *:s +:x 235 *:s +:y
setxy 121 *:s +:x 242 *:s +:y
setxy 123 *:s +:x 245 *:s +:y
setxy 121 *:s +:x 255 *:s +:y
setxy 138 *:s +:x 262 *:s +:y
setxy 141 *:s +:x 254 *:s +:y
setxy 146 *:s +:x 253 *:s +:y
setxy 157 *:s +:x 245 *:s +:y
setxy 163 *:s +:x 233 *:s +:y
setxy 168 *:s +:x 233 *:s +:y
setxy 175 *:s +:x 238 *:s +:y
setxy 177 *:s +:x 223 *:s +:y
setxy 201 *:s +:x 216 *:s +:y
setxy 204 *:s +:x 216 *:s +:y
setxy 216 *:s +:x 209 *:s +:y
setxy 225 *:s +:x 209 *:s +:y
setxy 232 *:s +:x 202 *:s +:y
setxy 224 *:s +:x 181 *:s +:y
setxy 226 *:s +:x 164 *:s +:y
setxy 222 *:s +:x 159 *:s +:y
setxy 215 *:s +:x 160 *:s +:y
setxy 214 *:s +:x 155 *:s +:y
setxy 209 *:s +:x 148 *:s +:y
setxy 200 *:s +:x 127 *:s +:y
setxy 205 *:s +:x 124 *:s +:y
setxy 209 *:s +:x 124 *:s +:y
setxy 216 *:s +:x 117 *:s +:y
setxy 213 *:s +:x 108 *:s +:y
setxy 218 *:s +:x 101 *:s +:y
setxy 220 *:s +:x 95 *:s +:y
setxy 218 *:s +:x 93 *:s +:y
setxy 213 *:s +:x 90 *:s +:y
setxy 212 *:s +:x 87 *:s +:y
setxy 223 *:s +:x 73 *:s +:y
setxy 221 *:s +:x 62 *:s +:y
setxy 225 *:s +:x 59 *:s +:y
setxy 232 *:s +:x 59 *:s +:y
setxy 236 *:s +:x 58 *:s +:y
setxy 237 *:s +:x 55 *:s +:y
setxy 237 *:s +:x 50 *:s +:y
setxy 234 *:s +:x 50 *:s +:y
setxy 233 *:s +:x 55 *:s +:y
setxy 231 *:s +:x 53 *:s +:y
setxy 231 *:s +:x 51 *:s +:y
setxy 220 *:s +:x 46 *:s +:y
setxy 216 *:s +:x 35 *:s +:y
setxy 210 *:s +:x 28 *:s +:y
setxy 198 *:s +:x 28 *:s +:y
setxy 190 *:s +:x 33 *:s +:y
setxy 187 *:s +:x 39 *:s +:y
setxy 185 *:s +:x 34 *:s +:y
setxy 182 *:s +:x 34 *:s +:y
setxy 179 *:s +:x 44 *:s +:y
setxy 181 *:s +:x 36 *:s +:y
setxy 176 *:s +:x 33 *:s +:y
setxy 172 *:s +:x 35 *:s +:y
setxy 170 *:s +:x 39 *:s +:y
setxy 148 *:s +:x 25 *:s +:y
setxy 150 *:s +:x 10 *:s +:y
setxy 152 *:s +:x 6 *:s +:y
setxy 123 *:s +:x 4 *:s +:y
setxy 117 *:s +:x 12 *:s +:y
setxy 102 *:s +:x 17 *:s +:y
setxy 89 *:s +:x 16 *:s +:y
setxy 79 *:s +:x 17 *:s +:y
setxy 72 *:s +:x 23 *:s +:y
setxy 70 *:s +:x 23 *:s +:y
setxy 60 *:s +:x 33 *:s +:y
setxy 71 *:s +:x 72 *:s +:y
setxy 76 *:s +:x 77 *:s +:y
setxy 74 *:s +:x 82 *:s +:y
setxy 74 *:s +:x 92 *:s +:y
setxy 74 *:s +:x 98 *:s +:y
setxy 83 *:s +:x 83 *:s +:y
setxy 87 *:s +:x 83 *:s +:y

end

The audio and wav files that I use above are:

Right click on a link and select "Save Target As..."

 
Department Home
Home
The information found on personal pages should not be considered official material from Mary Immaculate College and the College does not accept any responsibility for its accuracy or otherwise.