Home » Archimedes archive » Acorn User » AU 1995-09.adf » !Regulars » Regulars/StarInfo/Marshall/!Lottery/!Help
Regulars/StarInfo/Marshall/!Lottery/!Help
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1995-09.adf » !Regulars |
Filename: | Regulars/StarInfo/Marshall/!Lottery/!Help |
Read OK: | ✔ |
File size: | 09C4 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Lottery ~~~~~~~~ By Paul Marshall 20/3/95. A program to help you choose THE winning numbers in the National Lottery. Hopefully. It is an unescapeable fact that every draw of random numbers is completely unique; the randomness is unaffected by the draws which have taken place before, and any set of numbers is just as likely to come up as any other combination. Yet one can't help feeling that certain number combinations are less likely to win. It seems unlikely that for example 1, 2, 3, 4, 5, and 6 could be drawn out by the lottery machine in the same week. And even less likely that they would come out in that order, yet it is possible. And supposing the number 27 came out 6 weeks running. Would 27 be a good bet for the seventh week on the basis that it gets drawn often, or would you avoid it on the basis that it couldn't possibly be drawn again. At the time of writing number 34 has not been drawn yet, so isn't about time it was? No, sadly, it really doesn't make any difference which numbers you choose, so this program will generate for you a set of six completely random numbers. However, as that's a trifle boring it can also generate a set of numbers from a persons name, or pick at random from the most frequently drawn numbers in past draws, or at random from the least drawn numbers. The choice is made by clicking on the caption where the draw method is displayed. A menu will open up. An arrow from "By name" leads to an entry box for the user's name. The calculation to compute six numbers from a name needs at least seven characters to work on. Spaces are ignored and case is not important. It may sometimes throw up some indentical numbers; there is no way round this unfortunately, but the program does apologise. From the icon bar menu two other windows can be opened: 'Statistics' shows how often each number has been chosen. As the weeks go by the distribution should even out. It will be interesting to see if it does. 'Past Winners' shows the results of previous draws and allows each new draw to be entered. To enter a new result, click on the right-pointing arrows to step through to the next clear position. Enter the date and the numbers, then click on 'Save New'. Once saved entries cannot be altered. However, the data is stored in a plain text file called 'numbers' within the !Lottery application, and this can be edited if any mistakes have been made. Previous winning numbers can be found on BBC2 teletext on page 750. Good Luck!
00000000 0a 4c 6f 74 74 65 72 79 0a 7e 7e 7e 7e 7e 7e 7e |.Lottery.~~~~~~~| 00000010 7e 0a 42 79 20 50 61 75 6c 20 4d 61 72 73 68 61 |~.By Paul Marsha| 00000020 6c 6c 20 20 32 30 2f 33 2f 39 35 2e 0a 0a 0a 41 |ll 20/3/95....A| 00000030 20 70 72 6f 67 72 61 6d 20 74 6f 20 68 65 6c 70 | program to help| 00000040 20 79 6f 75 20 63 68 6f 6f 73 65 20 54 48 45 20 | you choose THE | 00000050 77 69 6e 6e 69 6e 67 20 6e 75 6d 62 65 72 73 20 |winning numbers | 00000060 69 6e 20 74 68 65 20 4e 61 74 69 6f 6e 61 6c 0a |in the National.| 00000070 4c 6f 74 74 65 72 79 2e 20 48 6f 70 65 66 75 6c |Lottery. Hopeful| 00000080 6c 79 2e 0a 0a 49 74 20 69 73 20 61 6e 20 75 6e |ly...It is an un| 00000090 65 73 63 61 70 65 61 62 6c 65 20 66 61 63 74 20 |escapeable fact | 000000a0 74 68 61 74 20 65 76 65 72 79 20 64 72 61 77 20 |that every draw | 000000b0 6f 66 20 72 61 6e 64 6f 6d 20 6e 75 6d 62 65 72 |of random number| 000000c0 73 20 69 73 0a 63 6f 6d 70 6c 65 74 65 6c 79 20 |s is.completely | 000000d0 75 6e 69 71 75 65 3b 20 20 74 68 65 20 72 61 6e |unique; the ran| 000000e0 64 6f 6d 6e 65 73 73 20 69 73 20 75 6e 61 66 66 |domness is unaff| 000000f0 65 63 74 65 64 20 62 79 20 74 68 65 20 64 72 61 |ected by the dra| 00000100 77 73 20 0a 77 68 69 63 68 20 68 61 76 65 20 74 |ws .which have t| 00000110 61 6b 65 6e 20 70 6c 61 63 65 20 62 65 66 6f 72 |aken place befor| 00000120 65 2c 20 61 6e 64 20 61 6e 79 20 73 65 74 20 6f |e, and any set o| 00000130 66 20 6e 75 6d 62 65 72 73 20 69 73 20 6a 75 73 |f numbers is jus| 00000140 74 20 61 73 0a 6c 69 6b 65 6c 79 20 74 6f 20 63 |t as.likely to c| 00000150 6f 6d 65 20 75 70 20 61 73 20 61 6e 79 20 6f 74 |ome up as any ot| 00000160 68 65 72 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 2e |her combination.| 00000170 0a 0a 59 65 74 20 6f 6e 65 20 63 61 6e 27 74 20 |..Yet one can't | 00000180 68 65 6c 70 20 66 65 65 6c 69 6e 67 20 74 68 61 |help feeling tha| 00000190 74 20 63 65 72 74 61 69 6e 20 6e 75 6d 62 65 72 |t certain number| 000001a0 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 73 20 61 72 | combinations ar| 000001b0 65 0a 6c 65 73 73 20 6c 69 6b 65 6c 79 20 74 6f |e.less likely to| 000001c0 20 77 69 6e 2e 20 20 49 74 20 73 65 65 6d 73 20 | win. It seems | 000001d0 75 6e 6c 69 6b 65 6c 79 20 74 68 61 74 20 66 6f |unlikely that fo| 000001e0 72 20 65 78 61 6d 70 6c 65 20 31 2c 20 32 2c 0a |r example 1, 2,.| 000001f0 33 2c 20 34 2c 20 35 2c 20 61 6e 64 20 36 20 63 |3, 4, 5, and 6 c| 00000200 6f 75 6c 64 20 62 65 20 64 72 61 77 6e 20 6f 75 |ould be drawn ou| 00000210 74 20 62 79 20 74 68 65 20 6c 6f 74 74 65 72 79 |t by the lottery| 00000220 20 6d 61 63 68 69 6e 65 20 69 6e 20 74 68 65 0a | machine in the.| 00000230 73 61 6d 65 20 77 65 65 6b 2e 20 41 6e 64 20 65 |same week. And e| 00000240 76 65 6e 20 6c 65 73 73 20 6c 69 6b 65 6c 79 20 |ven less likely | 00000250 74 68 61 74 20 74 68 65 79 20 77 6f 75 6c 64 20 |that they would | 00000260 63 6f 6d 65 20 6f 75 74 20 69 6e 20 74 68 61 74 |come out in that| 00000270 0a 6f 72 64 65 72 2c 20 79 65 74 20 69 74 20 69 |.order, yet it i| 00000280 73 20 70 6f 73 73 69 62 6c 65 2e 0a 0a 41 6e 64 |s possible...And| 00000290 20 73 75 70 70 6f 73 69 6e 67 20 74 68 65 20 6e | supposing the n| 000002a0 75 6d 62 65 72 20 32 37 20 63 61 6d 65 20 6f 75 |umber 27 came ou| 000002b0 74 20 36 20 77 65 65 6b 73 20 72 75 6e 6e 69 6e |t 6 weeks runnin| 000002c0 67 2e 20 57 6f 75 6c 64 20 32 37 20 62 65 0a 61 |g. Would 27 be.a| 000002d0 20 67 6f 6f 64 20 62 65 74 20 66 6f 72 20 74 68 | good bet for th| 000002e0 65 20 73 65 76 65 6e 74 68 20 77 65 65 6b 20 6f |e seventh week o| 000002f0 6e 20 74 68 65 20 62 61 73 69 73 20 74 68 61 74 |n the basis that| 00000300 20 69 74 20 67 65 74 73 20 64 72 61 77 6e 0a 6f | it gets drawn.o| 00000310 66 74 65 6e 2c 20 20 6f 72 20 77 6f 75 6c 64 20 |ften, or would | 00000320 79 6f 75 20 61 76 6f 69 64 20 69 74 20 6f 6e 20 |you avoid it on | 00000330 74 68 65 20 62 61 73 69 73 20 74 68 61 74 20 69 |the basis that i| 00000340 74 20 63 6f 75 6c 64 6e 27 74 0a 70 6f 73 73 69 |t couldn't.possi| 00000350 62 6c 79 20 62 65 20 64 72 61 77 6e 20 61 67 61 |bly be drawn aga| 00000360 69 6e 2e 20 20 41 74 20 74 68 65 20 74 69 6d 65 |in. At the time| 00000370 20 6f 66 20 77 72 69 74 69 6e 67 20 6e 75 6d 62 | of writing numb| 00000380 65 72 20 33 34 20 68 61 73 0a 6e 6f 74 20 62 65 |er 34 has.not be| 00000390 65 6e 20 64 72 61 77 6e 20 79 65 74 2c 20 73 6f |en drawn yet, so| 000003a0 20 69 73 6e 27 74 20 61 62 6f 75 74 20 74 69 6d | isn't about tim| 000003b0 65 20 69 74 20 77 61 73 3f 0a 0a 4e 6f 2c 20 73 |e it was?..No, s| 000003c0 61 64 6c 79 2c 20 69 74 20 72 65 61 6c 6c 79 20 |adly, it really | 000003d0 64 6f 65 73 6e 27 74 20 6d 61 6b 65 20 61 6e 79 |doesn't make any| 000003e0 20 64 69 66 66 65 72 65 6e 63 65 20 77 68 69 63 | difference whic| 000003f0 68 20 6e 75 6d 62 65 72 73 0a 79 6f 75 20 63 68 |h numbers.you ch| 00000400 6f 6f 73 65 2c 20 73 6f 20 74 68 69 73 20 70 72 |oose, so this pr| 00000410 6f 67 72 61 6d 20 77 69 6c 6c 20 67 65 6e 65 72 |ogram will gener| 00000420 61 74 65 20 66 6f 72 20 79 6f 75 20 61 20 73 65 |ate for you a se| 00000430 74 20 6f 66 20 73 69 78 0a 63 6f 6d 70 6c 65 74 |t of six.complet| 00000440 65 6c 79 20 72 61 6e 64 6f 6d 20 6e 75 6d 62 65 |ely random numbe| 00000450 72 73 2e 20 48 6f 77 65 76 65 72 2c 20 61 73 20 |rs. However, as | 00000460 74 68 61 74 27 73 20 61 20 74 72 69 66 6c 65 20 |that's a trifle | 00000470 62 6f 72 69 6e 67 20 69 74 0a 63 61 6e 20 61 6c |boring it.can al| 00000480 73 6f 20 67 65 6e 65 72 61 74 65 20 61 20 73 65 |so generate a se| 00000490 74 20 6f 66 20 6e 75 6d 62 65 72 73 20 66 72 6f |t of numbers fro| 000004a0 6d 20 61 20 70 65 72 73 6f 6e 73 20 6e 61 6d 65 |m a persons name| 000004b0 2c 20 6f 72 20 70 69 63 6b 0a 61 74 20 72 61 6e |, or pick.at ran| 000004c0 64 6f 6d 20 66 72 6f 6d 20 74 68 65 20 6d 6f 73 |dom from the mos| 000004d0 74 20 66 72 65 71 75 65 6e 74 6c 79 20 64 72 61 |t frequently dra| 000004e0 77 6e 20 6e 75 6d 62 65 72 73 20 69 6e 20 70 61 |wn numbers in pa| 000004f0 73 74 20 64 72 61 77 73 2c 0a 6f 72 20 61 74 20 |st draws,.or at | 00000500 72 61 6e 64 6f 6d 20 66 72 6f 6d 20 74 68 65 20 |random from the | 00000510 6c 65 61 73 74 20 64 72 61 77 6e 20 6e 75 6d 62 |least drawn numb| 00000520 65 72 73 2e 0a 0a 54 68 65 20 63 68 6f 69 63 65 |ers...The choice| 00000530 20 69 73 20 6d 61 64 65 20 62 79 20 63 6c 69 63 | is made by clic| 00000540 6b 69 6e 67 20 6f 6e 20 74 68 65 20 63 61 70 74 |king on the capt| 00000550 69 6f 6e 20 77 68 65 72 65 20 74 68 65 20 64 72 |ion where the dr| 00000560 61 77 0a 6d 65 74 68 6f 64 20 69 73 20 64 69 73 |aw.method is dis| 00000570 70 6c 61 79 65 64 2e 20 41 20 6d 65 6e 75 20 77 |played. A menu w| 00000580 69 6c 6c 20 6f 70 65 6e 20 75 70 2e 20 41 6e 20 |ill open up. An | 00000590 61 72 72 6f 77 20 66 72 6f 6d 20 22 42 79 20 6e |arrow from "By n| 000005a0 61 6d 65 22 0a 6c 65 61 64 73 20 74 6f 20 61 6e |ame".leads to an| 000005b0 20 65 6e 74 72 79 20 62 6f 78 20 66 6f 72 20 74 | entry box for t| 000005c0 68 65 20 75 73 65 72 27 73 20 6e 61 6d 65 2e 0a |he user's name..| 000005d0 0a 54 68 65 20 63 61 6c 63 75 6c 61 74 69 6f 6e |.The calculation| 000005e0 20 74 6f 20 63 6f 6d 70 75 74 65 20 73 69 78 20 | to compute six | 000005f0 6e 75 6d 62 65 72 73 20 66 72 6f 6d 20 61 20 6e |numbers from a n| 00000600 61 6d 65 20 6e 65 65 64 73 20 61 74 20 6c 65 61 |ame needs at lea| 00000610 73 74 0a 73 65 76 65 6e 20 63 68 61 72 61 63 74 |st.seven charact| 00000620 65 72 73 20 74 6f 20 77 6f 72 6b 20 6f 6e 2e 20 |ers to work on. | 00000630 53 70 61 63 65 73 20 61 72 65 20 69 67 6e 6f 72 |Spaces are ignor| 00000640 65 64 20 61 6e 64 20 63 61 73 65 20 69 73 20 6e |ed and case is n| 00000650 6f 74 0a 69 6d 70 6f 72 74 61 6e 74 2e 20 49 74 |ot.important. It| 00000660 20 6d 61 79 20 73 6f 6d 65 74 69 6d 65 73 20 74 | may sometimes t| 00000670 68 72 6f 77 20 75 70 20 73 6f 6d 65 20 69 6e 64 |hrow up some ind| 00000680 65 6e 74 69 63 61 6c 20 6e 75 6d 62 65 72 73 3b |entical numbers;| 00000690 0a 74 68 65 72 65 20 69 73 20 6e 6f 20 77 61 79 |.there is no way| 000006a0 20 72 6f 75 6e 64 20 74 68 69 73 20 75 6e 66 6f | round this unfo| 000006b0 72 74 75 6e 61 74 65 6c 79 2c 20 62 75 74 20 74 |rtunately, but t| 000006c0 68 65 20 70 72 6f 67 72 61 6d 20 64 6f 65 73 0a |he program does.| 000006d0 61 70 6f 6c 6f 67 69 73 65 2e 0a 0a 0a 46 72 6f |apologise....Fro| 000006e0 6d 20 74 68 65 20 69 63 6f 6e 20 62 61 72 20 6d |m the icon bar m| 000006f0 65 6e 75 20 74 77 6f 20 6f 74 68 65 72 20 77 69 |enu two other wi| 00000700 6e 64 6f 77 73 20 63 61 6e 20 62 65 20 6f 70 65 |ndows can be ope| 00000710 6e 65 64 3a 0a 20 20 0a 27 53 74 61 74 69 73 74 |ned:. .'Statist| 00000720 69 63 73 27 20 73 68 6f 77 73 20 68 6f 77 20 6f |ics' shows how o| 00000730 66 74 65 6e 20 65 61 63 68 20 6e 75 6d 62 65 72 |ften each number| 00000740 20 68 61 73 20 62 65 65 6e 20 63 68 6f 73 65 6e | has been chosen| 00000750 2e 20 41 73 20 74 68 65 0a 77 65 65 6b 73 20 67 |. As the.weeks g| 00000760 6f 20 62 79 20 74 68 65 20 64 69 73 74 72 69 62 |o by the distrib| 00000770 75 74 69 6f 6e 20 73 68 6f 75 6c 64 20 65 76 65 |ution should eve| 00000780 6e 20 6f 75 74 2e 20 49 74 20 77 69 6c 6c 20 62 |n out. It will b| 00000790 65 20 69 6e 74 65 72 65 73 74 69 6e 67 0a 74 6f |e interesting.to| 000007a0 20 73 65 65 20 69 66 20 69 74 20 64 6f 65 73 2e | see if it does.| 000007b0 0a 0a 27 50 61 73 74 20 57 69 6e 6e 65 72 73 27 |..'Past Winners'| 000007c0 20 73 68 6f 77 73 20 74 68 65 20 72 65 73 75 6c | shows the resul| 000007d0 74 73 20 6f 66 20 70 72 65 76 69 6f 75 73 20 64 |ts of previous d| 000007e0 72 61 77 73 20 61 6e 64 20 61 6c 6c 6f 77 73 0a |raws and allows.| 000007f0 65 61 63 68 20 6e 65 77 20 64 72 61 77 20 74 6f |each new draw to| 00000800 20 62 65 20 65 6e 74 65 72 65 64 2e 20 54 6f 20 | be entered. To | 00000810 65 6e 74 65 72 20 61 20 6e 65 77 20 72 65 73 75 |enter a new resu| 00000820 6c 74 2c 20 63 6c 69 63 6b 20 6f 6e 20 74 68 65 |lt, click on the| 00000830 0a 72 69 67 68 74 2d 70 6f 69 6e 74 69 6e 67 20 |.right-pointing | 00000840 61 72 72 6f 77 73 20 74 6f 20 73 74 65 70 20 74 |arrows to step t| 00000850 68 72 6f 75 67 68 20 74 6f 20 74 68 65 20 6e 65 |hrough to the ne| 00000860 78 74 20 63 6c 65 61 72 20 70 6f 73 69 74 69 6f |xt clear positio| 00000870 6e 2e 20 0a 45 6e 74 65 72 20 74 68 65 20 64 61 |n. .Enter the da| 00000880 74 65 20 61 6e 64 20 74 68 65 20 6e 75 6d 62 65 |te and the numbe| 00000890 72 73 2c 20 74 68 65 6e 20 63 6c 69 63 6b 20 6f |rs, then click o| 000008a0 6e 20 27 53 61 76 65 20 4e 65 77 27 2e 20 4f 6e |n 'Save New'. On| 000008b0 63 65 20 73 61 76 65 64 0a 65 6e 74 72 69 65 73 |ce saved.entries| 000008c0 20 63 61 6e 6e 6f 74 20 62 65 20 61 6c 74 65 72 | cannot be alter| 000008d0 65 64 2e 20 48 6f 77 65 76 65 72 2c 20 74 68 65 |ed. However, the| 000008e0 20 64 61 74 61 20 69 73 20 73 74 6f 72 65 64 20 | data is stored | 000008f0 69 6e 20 61 20 70 6c 61 69 6e 0a 74 65 78 74 20 |in a plain.text | 00000900 66 69 6c 65 20 63 61 6c 6c 65 64 20 27 6e 75 6d |file called 'num| 00000910 62 65 72 73 27 20 77 69 74 68 69 6e 20 74 68 65 |bers' within the| 00000920 20 21 4c 6f 74 74 65 72 79 20 61 70 70 6c 69 63 | !Lottery applic| 00000930 61 74 69 6f 6e 2c 20 61 6e 64 20 74 68 69 73 0a |ation, and this.| 00000940 63 61 6e 20 62 65 20 65 64 69 74 65 64 20 69 66 |can be edited if| 00000950 20 61 6e 79 20 6d 69 73 74 61 6b 65 73 20 68 61 | any mistakes ha| 00000960 76 65 20 62 65 65 6e 20 6d 61 64 65 2e 20 50 72 |ve been made. Pr| 00000970 65 76 69 6f 75 73 20 77 69 6e 6e 69 6e 67 0a 6e |evious winning.n| 00000980 75 6d 62 65 72 73 20 63 61 6e 20 62 65 20 66 6f |umbers can be fo| 00000990 75 6e 64 20 6f 6e 20 42 42 43 32 20 74 65 6c 65 |und on BBC2 tele| 000009a0 74 65 78 74 20 6f 6e 20 70 61 67 65 20 37 35 30 |text on page 750| 000009b0 2e 0a 20 0a 0a 47 6f 6f 64 20 4c 75 63 6b 21 20 |.. ..Good Luck! | 000009c0 0a 0a 0a 0a |....| 000009c4