1! Program INTXLG.BAS Version 1 June, 1976 This is the interactive dialogue control module for Units 1 thru 3B (Data generators GEN1 thru GEB3B), which have 32 steps each. 2! Department of Psychology Lawrence University Appleton, Wisconsin, 54911 (414) 739-3681, Ext. 464 3! Copyright (C) 1975, 1976 by Francis Campos. General permission to copy or modify, but not for profit, all or part of this document or the software described herein is hereby 4! granted, provided that this copyright notice is given, and reference is made to the fact that reproduction privileges were granted by permission of Francis Campos, Lawrence University. 5! Although every effort has been made to insure the accuracy and usefulness of this document and the software described herein, neither the author(s), Lawrence University, nor its funding 6! sources make any warranty, expressed or implied, with respect to the performance or features of same on equipment which Lawrence neither owns nor controls. 7! This program is one of the twenty-one BASIC-PLUS programs and eighteen virtual core files that comprise the CASANOVA package for Computer ASsisted instruction in ANalysis Of 8! VAriance. The package is coded for use on a PDP 11/40, 45 or 70 computer operating under RSTS/E, V6A-02. Those who wish to adapt the package to other systems and/or programming languages are 9! urged to consult the BASIC-PLUS Language Manual, published by the Digital Equipment Corporation, Maynard, Massachusetts, 01754, as well as the Instructor's Manual for CASANOVA, provided by Lawrence. 90 PRINT : PRINT 100 INPUT"WHAT IS YOUR NAME";Z1$ 102 T=0: Q7=0 105 PRINT:Q=0 110 Z$=Z1$+".XDS" 120 OPEN Z$ AS FILE 1 130 DIM #1, A2(32),A2$(2) 140 DIM A(32),D(64) 150 N=A2(0) 155 Z3$=LEFT(A2$(1),1) 160 Z$="HELP"+Z3$+".TXT" 170 OPEN Z$ AS FILE 2 180 DIM #2, H$(1,128)=64 190 Z$="INST"+Z3$+".TXT" 200 OPEN Z$ AS FILE 3 210 DIM #3, A$(128)=64 220 A(J)=A2(J) FOR J=1 TO N 230 T=T+1: Z=0: IF T=N+1 THEN 3100 240 Q7=Q7+1 250 IF A$(Q7)="HALT" THEN 1000 260 IF A$(Q7)="HALT123456789" THEN 3100 270 PRINT A$(Q7): GOTO 240 500 INPUT"WHAT'S YOUR ANSWER";A 510 IF ABS((A-A(T))/A(T))<.001 THEN 230 520 IF ABS((A-A(T))/A(T))<.01 THEN 540 530 PRINT"SORRY - THAT'S INCORRECT": GOTO 1000 540 PRINT"CLOSE ENOUGH - IT'S EXACTLY ";A(T):GOTO 230 600 IF Z=0 THEN Z=1 ELSE IF Z=1 THEN Z=2 610 I=T*4-4 620 PRINT H$(Z-1,J) FOR J=I TO (I+3) 630 GOTO 1000 1000 INPUT">>";X$ 1010 IF X$="SUM" THEN 2000 1020 IF X$="SUMSQ" THEN 2040 1030 IF X$="MULT" THEN 2080 1040 IF X$="DIV" THEN 2090 1050 IF X$="SQRT" THEN 2100 1060 IF X$="M&V" THEN 2110 1070 IF X$="DONE" THEN 500 1080 IF X$="HELP" THEN 600 1090 IF X$="|" THEN 500 1100 IF X$="SUB" THEN 2160 1110 IF X$="SQ" THEN 2170 1120 IF X$="QUIT" THEN 3000 1130 IF X$="SKIP" THEN 2180 1140 IF X$="PEEK" THEN 2200 1150 IF X$="~" THEN 2230 1160 IF X$="_" THEN 2240 1170 IF X$="" THEN 2250 1990 PRINT"WHAT?": GOTO 1000 2000 INPUT"N";K:IF K>60 OR K<1 THEN 2900 2010 &"DATA ";:MAT INPUT D(K):C=0 2020 C=C+D(J) FOR J=1 TO K 2030 PRINT"SUM = ";C:GOTO 1000 2040 INPUT"N";K: IF K>60 OR K<1 THEN 2900 2050 &"DATA ";:MAT INPUT D(K):C=0 2060 C=C+D(J)^2 FOR J=1 TO K 2070 PRINT"SUMSQ =";C:GOTO 1000 2080 INPUT"A";A:INPUT"B";B:PRINT"A*B=";A*B:GOTO 1000 2090 INPUT"A";A:INPUT"B";B:PRINT"A/B=";A/B:GOTO 1000 2100 INPUT"A";A:PRINT"SQUARE ROOT OF A =";SQR(A):GOTO 1000 2110 INPUT"N";K:IF K>60 OR K<1 THEN 2900 2120 PRINT"DATA:";:MAT INPUT D(K):C=0:A=0 2130 C=C+D(J)/K FOR J=1 TO K 2140 A=A+(D(J)-C)^2/(K-1) FOR J=1 TO K 2150 PRINT"MEAN =";C,"VARIANCE =";A: GOTO 1000 2160 INPUT"A";A:INPUT"B";B:PRINT"A-B=";A-B:GOTO 1000 2170 INPUT"A";A:PRINT"A SQUARED =";A^2:GOTO 1000 2180 &"STEP #";T;" HAS BEEN SKIPPED.":GOTO 200 2200 IF A2$(0)="PEEKED" THEN 2210 ELSE 2220 2210 PRINT"SORRY, YOU'VE DONE THAT BEFORE.": GOTO 1000 2220 PRINT"THE ANSWER IS ";A(T) 2222 A2$(0)="PEEKED" 2225 PRINT"TRY TO FIND OUT WHERE THE PROBLEM WAS.": GOTO 1000 2230 PRINT"STEP";T;". ANS=";A(T): GOTO 200 2240 &"ANSWER =";A(T): GOTO 1000 2250 PRINT"ANSWERS": FOR J=1 TO N 2260 PRINT J,A(J):NEXT J:GOTO 1000 2900 PRINT"N IS TOO LARGE OR TOO SMALL. TRY AGAIN.":GOTO 1000 3000 PRINT"THIS HOMEWORK HAS BEEN TERMINATED." 3100 PRINT"THAT'S THE END OF HOMEWORK ";A2$(1) 3110 CLOSE1,2,3 9999 END