CLS RANDOMIZE TIMER stay% = 0 debug% = 0 'set to 1 to see numbers computer chose numbertri

---
Master Index Current Directory Index Go to SkepticTank Go to Human Rights activist Keith Henson Go to Scientology cult

Skeptic Tank!

CLS RANDOMIZE TIMER stay% = 0 debug% = 0 'set to 1 to see numbers computer chose numbertries% = 250 'adjust to taste and speed of computer FOR y% = 1 TO 2 gotitright% = 0 IF y% = 2 THEN stay% = 1 FOR x% = 1 TO numbertries% rightdoor% = INT((RND * 3) + 1) chosendoor% = INT((RND * 3) + 1) emptydoor% = 1 DO WHILE emptydoor% = rightdoor% OR emptydoor% = chosendoor% emptydoor% = emptydoor% + 1 LOOP switchdoor% = 1 DO WHILE switchdoor% = emptydoor% OR switchdoor% = chosendoor% switchdoor% = switchdoor% + 1 LOOP IF debug% THEN PRINT "Right:"; rightdoor%, "Choice:"; chosendoor%, PRINT "Empty:"; emptydoor%, "Switch:"; switchdoor% END IF IF stay% = 0 THEN chosendoor% = switchdoor% END IF IF chosendoor% = rightdoor% THEN gotitright% = gotitright% + 1 NEXT PRINT "You were "; IF stay% > 0 THEN PRINT "not "; PRINT "switching doors." PRINT "You got it right"; gotitright%; PRINT "times out of"; numbertries%; "attempts (apx."; PRINT (gotitright% / numbertries%) * 100; "%)" NEXT

---

E-Mail Fredric L. Rice / The Skeptic Tank