‘еŒBрЭDЗ“‘йИ:мСddџО Ј( @€ЯаРПпрАяЏ  я(№/№/я(я рŸ 0№/8џ0@џ0?џ/8№ 0я(р п?Gџ@PџOWџOXџOPџ?Hџ0@№/7я@Oџ_`џ`hџ_hџPXџ 0р(пP_џopџpxџowџ_gџ@O№/8я'п'р 7№pџ€џ‡џ`oџ?Gя/7р Я€0?№€ˆџ?Hя/8р`/пo?G№OX№@Hя0?р/аpOW№?Hр/8п 7яOPя?Gр/7п(Я РP0@яPX№@Oя0@п 0аO а@H№/Я@'а 0п0@р@P№0?п'Я_OP№@Hр(а 7п/7а'Р Пџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ^^^^^^^^^^џџџџџџџџџџџџџџџџџџџџ^^^^^^^^^^^^^^џџџџџџџџџџџџџџџџ^^TeeBBBBeTT^^^^^^џџџџџџџџџџџџџ^eBDJ33333JJDBeZ^^^^џџџџџџџџџџџTD33==#####==3JDBT^^^^џџџџџџџџџeJ=###=3DeZ^^TџџџџџџџB3# #=3JBZ^^Tџџџџџџ3#  #=JBT^^џџџџџJ# Sll #=JBZ^Tџџџџ# %,68??86,/@A*< ##џџџџ45('.6787-9%:;*<=#џџџџџ$+&,--.,/01)2 3џџџџџџ $%&&'%($!)* ##џџџџџџџ  !"#џџџџџџџџџ  џџџџџџџџџџџ  џџџџџџџџџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџРџџџќџј№?рРР€€€€РРр№?јќџџџџРџdжoМ8Ут@dice  Dxœsђ5уa3 жb(fd€H@хQ@ƒУ(EЃh vDг"‹ІЅ"V0j>нТЭ Z>ŠFб(EC хПхѓ cxœsђ5уa3 жb(fd€H@хQ@ƒУа@4u0MУ+ ЉсTДbЈ›Oы№Чju GГ‚†ЂQ4Ь}2# :†TДbЈ›Oы№Чju GГ‚†Ђс‚тЌ3 Yxœsђ5уa3 жb(fd€H@хQ@ƒУ(ЂЂi˜г4ZБ‚QѓщўhVаТ№СFГЯp5Ÿжсf- EtфбL:ŒЭЇuќЂYA У‡ щSЉ3 nxœsђ5уa3 жb(fd€H@хQ@ƒУA4u3IСBjbTQLЊ<`Э'>HЩ6ŸјєCžсДKlЃh"к!RГ!yeyъёk!ЕЄТFЭ'Я|ZЧ/š‚*1­ RЫ(ЉєŸwГ uxœsђ5уa3 жb(fd€H@хQ@ƒu‘’g/‘n&ЯkXйЪ†ŸљД:ЄŸQ4 MЃž’ЄKЊсTЗbЈ›Oы№GГ‚†Dv Ѓ‘ьH$F#й‰H#ж|т#Ž<У‰O?Ф+ETBЄыqГ xœsђ5уa3 жb(fd€H@хQ@ƒУрEЄ:•$пaЄЊЧЃeд|RЕP7~‡"УЇd‡'I†“—H2П–h>ЉQFЊсЄІR"тУ“AJvz&Яpќz)Lљј5’ф’сa>IёKžљhIr 1†“ŠhjјШ@7‡?s coin spinning  Јxœэ”K@0@kя––NаЕиЛ“›гPўчг a2ГšzщФ4ЫVь!U Њz]шކюлБ~#cQˆМŒсфZтdзR NT`рhŽPPсPE’т|Ї<™сƒсDEќЋcѓёс№!­'ѓЭd‹Dр…Я/rП№§dЎhb, 8lDє—П_ћџIU рxŽQсЇ"ПБdИm Ÿќч‹s…}6 Бxœэ”A@0 Ekя––N`mьнЩЭ1jŒІM›Ÿb2ЩFуНjаmiжh—j–ЊЗ*LeЖu7Іo$'‘Ч.œЙžL-—С• О_їEєР9ОTaм~№E HŒчђ‰х~ъUїS&ћ\>ЫЭќј”#ќф| у#џЭў…mѓ›po9"%?C!‚kWРppжИќЃSУ]K ђЩО8gзЊ4Ёheads  Јxœэ”K@0@kя––NаЕиЛ“›гPўчг a2ГšzщФ4ЫVь!U Њz]шކюлБ~#cQˆМŒсфZтdзR NT`рhŽPPсPE’т|Ї<™сƒсDEќЋcѓёс№!­'ѓЭd‹Dр…Я/rП№§dЎhb, 8lDє—П_ћџIU рxŽQсЇ"ПБdИm Ÿќч‹s…}6tails  Бxœэ”A@0 Ekя––N`mьнЩЭ1jŒІM›Ÿb2ЩFуНjаmiжh—j–ЊЗ*LeЖu7Іo$'‘Ч.œЙžL-—С• О_їEєР9ОTaм~№E HŒчђ‰х~ъUїS&ћ\>ЫЭќј”#ќф| у#џЭў…mѓ›po9"%?C!‚kWРppжИќЃSУ]K ђЩО8gзЊ4ЁЄИє number1-6Ўџџџџœџџџџџџџ Иcџџџџanswer0000000џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџИ action_draw_fontџџџџ"Times New Roman",24,0,0,0,0,010000000Иaction_draw_textџџџџ" "+ string(answer)10010000000џџџџwИтaction_if_next_roomџџџџ00000000Иоaction_next_roomџџџџ00000000 Иcџџџџanswerfloor(random(6)+1)000000џџџџџџџџdiceЎœџџџџџџџ ИЭaction_set_spriteџџџџ05000000џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwИтaction_if_next_roomџџџџ00000000Иоaction_next_roomџџџџ00000000 Иcџџџџ image_singlefloor(random(6))000000џџџџџџџџcoinЎœџџџџџџџ ИЭaction_set_spriteџџџџ15000000џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџwИтaction_if_next_roomџџџџ00000000Иоaction_next_roomџџџџ00000000 И•action_if_diceџџџџ20000000ИЭaction_set_spriteџџџџ25000000ИЅџџџџ00000000ИЭaction_set_spriteџџџџ35000000џџџџџџџџnormaldistributionЎџџџџœџџџџџџџ И-action_set_alarmџџџџ50000000ИЧaction_set_lifeџџџџ00000000Илaction_set_captionџџџџ1heads: 1trials: 0health: 00Иcџџџџv[101]0000000џџџџџџџџ ИЧaction_set_lifeџџџџ10000000ИНaction_set_scoreџџџџ00000000ИЇџџџџ1000000000ИІџџџџ00000000И•action_if_diceџџџџ20000000ИНaction_set_scoreџџџџ10000000ИЈџџџџ00000000Иcџџџџv[score]1000000И-action_set_alarmџџџџ50000000џџџџџџџџџџџџџџџџџџџџџџџџИaction_draw_lineџџџџ204805204800000Иaction_draw_lineџџџџ2080204800000И action_draw_fontџџџџ"Times New Roman",8,0,0,0,0,010000000Иaction_draw_textџџџџ02048000000Иaction_draw_textџџџџ5027048000000Иaction_draw_textџџџџ100 heads52048000000Иaction_draw_textџџџџ frequency06000000Иaction_draw_textџџџџ40008000000Иaction_draw_textџџџџ300018000000Иaction_draw_textџџџџ100038000000Иaction_draw_textџџџџ200028000000Иcџџџџi0000000ИЇџџџџ1000000000ИІџџџџ00000000Иџaction_draw_rectangleџџџџ5*(i+4)4805*(i+5)480-v[i]0000Иcџџџџi1000000ИЈџџџџ00000000џџџџџџџџџџџџcoin2Ўœџџџџџџџ И-action_set_alarmџџџџ100000000ИЭaction_set_spriteџџџџ15000000Илaction_set_captionџџџџ1heads: 1tails: 0health: 00ИНaction_set_scoreџџџџ00000000ИЧaction_set_lifeџџџџ00000000џџџџџџџџИЭaction_set_spriteџџџџ15000000И-action_set_alarmџџџџ80000000 И•action_if_diceџџџџ20000000ИІџџџџ00000000ИЭaction_set_spriteџџџџ25000000ИНaction_set_scoreџџџџ10000000ИЈџџџџ00000000ИЅџџџџ00000000ИІџџџџ00000000ИЭaction_set_spriteџџџџ35000000ИЧaction_set_lifeџџџџ10000000ИЈџџџџ00000000И-action_set_alarmџџџџ81000000џџџџџџџџџџџџwИоaction_next_roomџџџџ00000000џџџџџџџџџџџџџџџџџџџџџџџџ coin2graphЎџџџџœџџџџџџџ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџИ action_draw_fontџџџџ"Times New Roman",8,0,0,0,0,010000000Иaction_draw_textџџџџheads2046000000Иaction_draw_textџџџџtails6046000000Иџaction_draw_rectangleџџџџ2045040 450-score0000Иџaction_draw_rectangleџџџџ6045080 450-lives0000џџџџџџџџџџџџЄroom1Space to toss, next demo F8€рРРРџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџpЁ†room2$Space to roll dice, F8 for next demo€рРРРџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџРЂ†room02Space to toss, F1 for an explanation, next demo F8€рРРРџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџАЃ†room4*Tossing a coin 100 times, €єРРРџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ РЄ†room3&Counting heads and tails, next demo F8€рРРРџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџ€р џџџџџџџџџџџџааІ† аЇ†Ї†€–˜Ўџџ€Х {\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fcharset1 Arial;}{\f3\fswiss\fcharset1 Arial;}{\f4\fswiss\fcharset1 MS Sans Serif;}{\f5\fswiss\fprq2 System;}{\f6\fmodern\fcharset1 Courier New;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\cf0\b Dice.gmd a demonstration of probability \par Tony Forster, March 2005 \par http://edrington.haileybury.vic.edu.au/computerclub \par May be copied with acknowledgement of authorship \par \plain\f3\fs24\cf0 \par Room0 \par \plain\f4\fs16 Tossing a coin is easy: \par with a chance of 1 out of 2 perform the next action \par set the sprite to heads \par else \par set the sprite to tails \par \plain\f3\fs24\cf0 \par Room1 \par \plain\f4\fs16\cf0 in the spacebar event \par random(6) returns a number between 1.00000 and 5.99999..... \par floor rounds down to a whole number \par floor(random(6)) returns a number between 0 and 5 \par floor(random(6)+1) returns a number between 1 and 6 \par answer=floor(random(6)+1) returns a number between 1 and 6 sets the variable answer \par \par draw event \par " "+ string(answer) turns answer to a text string which can be displayed on the screen \par \par \plain\f3\fs24\cf0 Room2 \par \plain\f4\fs16\cf0 The sprite for the die (one die, two dice) has 6 images numbered 0 to 5 \par in the spacebar event \par floor(random(6)) returns a number between 0 and 5 \par image_single=floor(random(6)) selects image 0..5 of the sprite \par \par \plain\f3\fs24\cf0 Room3 \par \plain\f4\fs16\cf0 Computers are really good at doing stuff a lot of times \par Score is used to count the heads, lives the tails \par \plain\f4\fs16 \par with a chance of 1 out of 2 do perform the next action \par set the sprite to heads \par set the score relative to 1 \par else \par set the sprite to tails \par set the number of lives relative to 1 \par \plain\f4\fs16\cf0 \par The results are graphed with 2 rectangles \par \par \plain\f4\fs16 draw rectangle with vertices (20,450) and (40,450-score) \par draw rectangle with vertices (60,450) and (80,450-lives) \par \plain\f4\fs16\cf0 \par \plain\f3\fs24\cf0 \par Room4\plain\f4\fs16\cf0 \par Computers are really good at doing stuff a lot of times \par If you toss a coin 100 times, you expect about but not exactly 50 heads. \par After tossing 100 times, the computer saves the result by adding one to a "bin", if it got 47 heads, it adds 1 to the "47 bin" \par \par There are 101 bins \par v[0] for the number of times there were 0 heads \par ............ \par v[100] for the number of times there were 100 heads \par \par The result is graphed by drawing 100 rectangles \par \plain\f4\fs16 set variable i to 0 \par repeat next action (block) 100 times \par draw rectangle with vertices (5*(i+4),480) and (5*(i+5),480-v[i]) \par set variable i relative to 1 \par \plain\f4\fs16\cf0 \par } є єSpritesdice coin spinningtailsheadsSounds BackgroundsPathsScripts Data Files Time LinesObjectscoin number1-6dicecoin2 coin2graphnormaldistributionRoomsroom0room1room2room3room4 Game Information Game Options