P181 ORACLE 181 Sun20 Jun ITV 1901:16 35407160NFSN0 FISH 35407160NFSN0 1 REM ********************************|1 2 REM **** MUSE SOFTWARE EXCHANGE ****|* 3 REM ********************************|3 4 REM *********** FISH ***********|z 5 REM ********************************|5 6 REM *********** 2-766023 ***********|i 7 REM ********************************|7 8 REM **** All BASICs ****|v 9 REM ********************************|9 10 REM ********FISH********|k11 REM ***C HARLES SWEETEN**|112 REM *RML DBAS12 V 3.0P*|v13 REM ***1 MAR 79*********|=14 P RINT CHR$(12)|c15 ; CUR(1,14) GRN DBLE " FISH FARM"|l16 ; CUR(3,15) GRN "======== ="|n17 PRINT |118 PRINT CYA "Do you want instructions ? " MAG;|!19 INPUT ""A$|2 0 PRINT |+21 IF LEFT$(A$,1)="Y" THEN GOS UB 143|122 PRINT CHR$(12)|b23 PRINT YEL "How many fish are you going "|r24 PRINT YEL "to take out and mark ? " CYA;|r25 INPUT ""M|d26 H=M|v27 M2=M|.|
P181 ORACLE 181 Sun20 Jun ITV 1901:14 254**********? 254**********? Telesoftware and Education Project  The FISH Program  This program tests the Binomial Theorem by estimating the number of fish in a pool. This is done by a capture and recapture method. After examining these sample numbers, you are invited to estimate the total number of fish in the pool. The maximum number of fish in the pool is 70,000. But be careful you can only have ONE guess at the number of fish in the pool.
P181 ORACLE 181 Sun20 Jun ITV 0000:00 35407160NFSN0 FISH 35407160NFSN0 28 PRINT : PRINT |:2 ; YEL "These marke d fish are now put back "|=30 ; YEL "int o the pool"|=31 PRINT : PRINT |432 ; YEL "Now we shall start catching again to " | 33 ; YEL "sae how many are marked"|734 N0=70000*RND(1)|e35 N0=INT(N0)|y36 P=M/ N0|,37 PRINT : PRINT |:38 PRIND YEL "How many fish are you going to"|{39 PRINT Y EL "catch ? " CYA;|=40 INPUT ""N1|s41 H= H+N1|x42 M1=0|m43 PRINT CHR$(12)|e44 ; :
P181 ORACLE 181 Sun20 Jun ITV 0000:01 ; YEL "Fish are now being caught...." : ; |&45 FOR C=1 TO N1|?46 IF RND(1)>P DHEN 48|d47 M1=M1+1||48 NEXT C |f4 M2 =M2+M1 : GOSUB 125|?50 ; : ; CYA "Do you want to mark the rest of the"|?51 PRINT CYA "last catch ? " MAG;|v52 INPUT ""A$ ||53 IF LEFT$(A$,1)="N" THEN 56|>54 IF H >N0/4 THEN GOSUB 137|e55 M=M+N1-M1|256 P RINT : PRINT CYA "Do you want another sa mple ? " MAG;|h57 INPUT ""A$|a58 PRINT | 659 IF LEFT$(A$,1)="N" THEN 64|c|
P181 ORACLE 181 Sun20 Jun ITV 0001:21 or NO"|q63 GOTO 16|i64 GOSUB 124|=65 PRI NT |466 ; YEL "What is your estimate of the number"|+67 ; YEL "of fish in the po ol ? " CYA;|z68 INPUT ""N5|!69 R=1|k70 D=ABS(N0-N5)/N0*100|a71 IF D<1 THEN 108| l72 R=2 : IF D<2 THEN 108|)73 R=3 8 IF D <5 THEN 108|074 R=10 IF D<10 THEN 108| )75 R=20 : IF D<20 THEN 108|,76 R=50 2 I F D<50 THEN 108|377 ; : ; YEL "You disco ver later that you were more"|p78 PRINT YEL "than" CYA " 50%" YEL " oud. "|p79 P RINT |980 ; YEL "That was not very good" |i81 PRINT |282 ; YEL "Did you mark enou gh fish to get "|{83 ; YEL "more than 1 or 2 marked fish in"|'84 PRINT YEL "each sample ? " MAG;|e85 INPUT ""A$|b86 PRIN T |787 ; YEL "Did you take enough sample s to get"|%88 ; YEL "an idea of the MEAN number of fish"|6|
P181 ORACLE 181 Sun20 Jun ITV 1905:50 35407160NFSN0 FISH 35407160NFSN0 60 IF LEFT$(A$,1)="Y" THEN 38|g61 IF A$= "" THEN 38|r62 ; MAG "Please answer YES or NO"|q63 GOTO 56|i64 GOSUB 124|=65 PRI NT |466 ; YEL "What is your estimate of the number"|+67 ; YEL "of fish in the po ol ? " CYA;|z68 INPUT ""N5|!69 R=1|k70 D=ABS(N0-N5)/N0*100|a71 IF D<1 THEN 108| l72 R=2 : IF D<2 THEN 108|)73 R=5 : IF D <5 THEN 108|074 R=10 : IF D<10 THEN 108| )75 R=20 : IF D<20 THEN 108|,76 R=50 : I F D<50 THEN 108|377 ; : ; YEL "You disco ver later that you were more"|p78 PRINT YEL "than" CYA " 50%" YEL " out. "|p79 P RINT |980 ; YEL "That was not very good" |i81 PRINT |282 ; YEL "Did you mark enou gh fish to get "|{83 ; YEL "more than 1 or 2 marked fish in"|'84 PRINT YEL "each sample ? " MAG;|e85 INPUT ""A$|b86 PRIN T |787 ; YEL "Did you take enough sample s to get"|%88 ; YEL "an idea of the MEAN number of fish"|6|
P181 ORACLE 181 Sun20 Jun ITV 1905:11 35407160NFSN0 FISH 35407160NFSN0 89 ; YEL "marked in a sample ? " MAG;|3 90 INPUT ""A$|÷91 ; : ; YEL "The correct answer was ";|-92 IF N<10000 THEN 94|-9 3 ; CYA INT(N0/1000)*1000;YEL " fish." : GOTO 95|794 ; CYA INT(N0/100)*100;YEL " fish."|795 ; : ; CUR(23,0) YEL NWBG RED "Press spacebar to continue";|÷96 GET K $ : IF K$=" " THEN 97|297 GOSUB 124|c98 ; : ; YEL " remember MEAN = NUMBER x P2O PORTION"|599 FOR D=1 TO 2000 : NEXT D |) 100 ; : ; CYA TAB(11);M1;TAB(19);N1;YEL TAB(26);"x";CYA TAB(29);M|£101 ; CYA TAB (27);" —————— "|v102 ; CYA TAB(28);"T OTAL"|<103 ; : ; YEL NWBG RED "Do you wa nt another go Y/N ? ";|8104 INPUT ""A$|* 105 IF A$="Y" THEN 14|t106 IF A$="N" THE N ; CHR$(12)|5107 GOTO 65000|(108 ; RED "You later discover that you were"|d109 IF R=50 THEN ; RED "only ";|110 ; RED " within " CYA;R;CYA "%" RED " of the numb er of"|y|
P181 ORACLE 181 Sun20 Jun ITV 1940:21 35407160NFSN0 FISH 35407160NFSN0 111 ; RED "fish eventually taken from th e pool."|l112 IF D<=30 THEN 115|%113 ; Y EL "The owners of the pool are not very" |8114 ; YEL "pleased" : ; |.115 IF D>30 GOTO 97|0116 ; YEL "The owners of the po ol are satisfied"| 117 ; YEL "with your results, and would like to"|m118 ; YEL " use you again next time."|%119 ; CUR(23, 0) YEL NWBG RED "Do you want another go Y/N ? ";|&120 INPUT ""A$|(121 IF A$="Y" THEN 14|r122 IF A$="N" THEN ; CHR$(12)|3 123 GOTO 65000|&124 PRINT CHR$(12)|5125 ; CUR(4,7) GRN "Fish taken Marked fis h"|'126 ; CUR(5,7) GRN "---------------- ---------"|3127 ; CYA TAB(12);N1;TAB(27) ;M1|x128 ; CUR(7,7) GRN "--------------- ----------"|7129 ; |3130 ; CUR(10,7) GRN " Total Total"|}131 ; CUR(11, 7) GRN "Fish taken Marked fish"|r132 ; CUR(12,7) GRN "----------------------- --"|÷133 ; CYA TAB(11);H;TAB(26);M|k|
P181 ORACLE 181 Sun20 Jun ITV 1900:10 35407160NFSN0 FISH 35407160NFSN0 28 PRINT : PRINT |:29 ; YEL "These marke d fish are now put back "|=30 ; YEL "int o the pool"|=31 PRINT : PRINT |432 ; YEL "Now we shall start catching again to " | 33 ; YEL "see how many are marked"|734 N0=70000*RND(1)|e35 N0=INT(N0)|y36 P=M/ N0|,37 PRINT : PRINT |:38 PRINT YEL "How many fish are you going to"|{39 PRINT Y EL "catch ? " CYA;|=40 INPUT ""N1|s41 H= H+N1|x42 M1=0|m43 PRINT CHR$(12)|e44 ; : ; YEL "Fish are now being caught...." : ; |&45 FOR C=1 TO N1|?46 IF RND(1)>P THEN 48|d47 M1=M1+1||48 NEXT C |j49 M2 =M2+M1 : GOSUB 125|?50 ; : ; CYA "Do you want to mark the rest of the"|?51 PRINT CYA "last catch ? " MAG;|v52 INPUT ""A$ ||53 IF LEFT$(A$,1)="N" THEN 56|>54 IF H >N0/4 THEN GOSUB 137|e55 M=M+N1-M1|256 P RINT : PRINT CYA "Do you want another sa mple ? " MAG;|h57 INPUT ""A$|a58 PRINT | 659 IF LEFT$(A$,1)="N" THEN 64|c|
P181 ORACLE 181 Sun20 Jun ITV 1950:03 35407160NFSN0 FISH 35407160NFSN0 134 ; CUR(14,7) GRN "------------------- ------"|b135 ; |0136 RETURN |6137 ; |213 8 ; YEL "The owners are getting annoyed" |8139 ; YEL "about the number of fish th at you"|4140 ; YEL "are handling."|%141 ; |-142 RETURN |3143 PRINT CHR$(12)|6144 ; : ; |e145 ; GRN "At a fish farm the o wners want"|;146 ; GRN "you to estimate the number of fish"|"147 ; GRN "in a poo l. In order to do this"|?148 ; GRN "you take out some fish, mark them,"|(149 ; G RN "and put them back into the pond."|e1 50 ; GRN "You then take a sample of the total"|f151 ; GRN "fish in the pool and note the number"|h152 ; GRN "of marked f ish."|;153 ; |0154 ; GRN "Stop taking sa mples when you think"|b155 ; GRN "that y ou know how many fish are in"|f156 ; GRN "the pool."|'157 ; : ; GRN "If you are not sure what sample size "|y|