Monty Hall maths problem

Use this section to showcase your programming examples. Or to ask members for programming suggestions
Post Reply
loftcat
Posts: 3
Joined: Tue Jun 06, 2023 9:21 pm
Location: UK
Contact:

Monty Hall maths problem

Post by loftcat »

As mentioned in the Welcome thread I've done one little coding effort on my Organiser II, a little implementation of the Monty Hall maths problem (https://en.wikipedia.org/wiki/Monty_Hall_problem) , complete with little character graphics :) I wrote it back in 2020 (another lockdown project!) and coded on my actual Psion device before retyping it into a text editor on my PC to save a copy here (I do not yet have a sync cable).
I'm sure it won't win any coding awards - it remains my first and only Organiser project so far - but thought it would be nice to share here.
There's two versions of the program in the zip file - one with short variable names to make it easier to type in. I hope works okay from this listing - I've not tried out the Simulator yet so if anyone tries this out do tell me if you find any problems!
You do not have the required permissions to view the files attached to this post.
User avatar
Martin
Global Admin
Posts: 220
Joined: Mon Jan 02, 2023 5:18 pm

RUNNING - Monty Hall maths problem

Post by Martin »

Hi Tony..

I tried your MONTY (& MONTY2).. And I managed to get it working on both an XP and LZ... A few thoughts...

(1) ORG2 Simulator/Emulator.. Don't bother trying it in there as ORG2 doesn't handle UDG's and PEEK's or POKE's
(2) I initially got confussed with both MONTY and MONTY2 being in one listing (but got there in the end).
(3) Are you on a Windows PC or an Apple product?
(3a) When I opened your 'MontyHall-concise' in Windows NotePad - it displayed poorly (something to do with the <TABS> and spaces I think)
(3b) When I opened it in Windows WordPad - It displayed correctly..
(3b.i) Once open in Windows WordPad I cut and pasted it into Windows NotePad to get rid of any 'control' characters (<TABS> etc..) that might interfere with the Comms Link or the Organiser [Prog][Trans] function. And of course saved it as MONTY.OPL and MONTY2.OPL
(4) How did you prove the UDG's, did you have a routine of some sort to confirm them before you included them in the program?
(4a) (or add) PRINT CHR$(5),PRINT CHR$(7),PRINT CHR$(7) : GET - to your MONTY2 routine?

I would say that typing all that in on an XP itself was dedication indeed..

Sincerely
Martin
Post Reply