A CAI System for Basic

computer-assisted instruction is a means of teaching a student by interaction with a com1uter through a remote console. This thesis will discuss teaching BASIC, a simple programming language, through computer-assisted instruction. The methods of instruction have been carefully planned for and tested with high school students, many of whom have had no computer programming experience. The project involves three phases. The first phase introduces the student to BASIC by means of a self-instructional manual containing all the :fundamentals one needs to know to program a fairly sophist~cated problem in BASIC. Contained in the manual are a series of questions which the student shoula answer to check his progress. Having finished this manual and studied the illustrative examples in the manual, he is now ready to be examined in this the second phase. A programmed examination is used to test each student; the questions for the exam are chosen at random from a bank of questions. The third phase involves problems stored in the computer which contain errors and deletions that the student must locate and correct. This third phase tests the student's programming ability, whereas, the programmed examination tests his understanding of various aspects of the language. The last two phases are more specifically classified as computer-managed instruction (CMI). The results, after having implemented this three phase plan, were quite gratifying having used high school students from many different schools in Rhode Island. All the students were able to solve the suggested problems at the end of the self-instructional manual which clearly indicates that the primary objective had been reached; i.e., to teach a beginner how to program an intelligent problem in BASIC. Students also learned good programming techniques, such as conservation of storage; however, this accomplishment would be most difficult to measure as it varied from student to student. The project was also implemented in a short course for high school teachers with much the same successful results. All who participated enjoyed the CAI method of instruction.

The project involves three phases. The first phase introduces the student to BASIC by means of a self-instructional manual containing all the :fundamentals one needs to know to program a fairly sophist~c ated problem in BASIC. The results, after having implemented this three phase plan, were quite gratifying having used high school students from many different schools in Rhode Island. All the students were able to solve the suggested problems at the end of the self-instructional manual which clearly indicates that the primary objective had been reached; i.e., to teach a beginner how to program an intelligent problem in BASIC. Students also learned good programming techniques, such as conservation of storage; however, this accomplishment would be most difficult to measure as it varied from student to student.
The project was also implemented in a short course for high school teachers with much the same successful results. All Science Foundation ( 1), some 74 projects were listed in CAI ranging trom "computer assisted teaching of mathematics" to "medical training simulations for anesthesiologists." To define CAI would be most difficult due to the many definitions already present for it. Peingold in his discussion of PLANIT, a CAI language ( 6.), defines CAI in a most general way by saying it is a "means using the computer to control or monitor the presentation of some portion of information".
CAI is an attempt at individualized instruction through automation, a process emphasized in ( } ) as being a "means of assisting the teacher" with no mention made of CAI actually replacing the teacher. The term "CAI" is sometimes used loosely and may mean a number of different things. Frye, in his discussion of choosing a computer language for communication in ( 8), clarifies this ambiguity by outlining three major categories that the CAI field may be subdivided into: -2-1) Problem-solving 2) Tutorial instruction

3) Computer-managed instruction
The first category, "problem solving", utilizes the computer to solve problems for a user by means of an interactive facility. "Tutorial instruction" employs the computer as a teacher, presenting the student with new material only when he has satisfactorily learned previous material. The interaction ta.lees place between the student and computer only. When the word "CAI" is used, most often it is in reference to this particular application. Finally, "computermanaged instruction (CM!)" deals with the computer processing and analyzing data for the teacher with less emphasis being placed on learning directly through lessons printed at a console.
In such a learning environment, the student learns at his own rate and as mentioned in (15), the feedback to the student is almost immediate, whereas it is much longer in conventional teaching metnods. Suppes in discussing some of his projects in (17), which include 1.) drill-and-practice program in elementary mathematics 2.) tutorial mathematics program for grade 2 3.) tutorial reading program for grade 1 4.) tutorial logic and algebraic programs grades 5 to 8 mentions tests and exercises were produced for students by -3the computer, these tests being commensurable to the student's ability. These projects involved use of remote terminals located in California, Mississippi, and Kentucky. Understanding the problems in education today, Suppes is quick to mention in (18) that this testing by the computer is an attempt at decreasing the burden of paperwork on the teacher.
CMI is a very important aspect of CAI because its purpose is to account for the results of the examinations. In a discussion of individualized instruction in Scienee ( 3 ), the authors emphasize that CMI must be able to collect and analyze the data on request in addition to storing it. It is not economically feasible to have a comp~ter do the job of a clerk. In this article, the "Oakleaf School project" is cited as an example of a CMI type system. The project involved use of the University of Pittsburgh's IBM 360 model 50 with terminals tied into the 360 system by leased-lines. After a student finishes a unit of instruction, his performance is stored on a scratch file on disk. At the end of the day, this · information is run with previously stored information concerning each student and an updating process ta.lees place with the results stored back again on tape. As a result, the teacher is able to request this information regarding the progress of each student at any time.  (14).
In order to best accomplish the purpose of this study, a complete CAI system was designed with the use of the components of a CAI system mentioned in Chapter I. The format for the system calls for a three phase plan. The initial phase involves the student reading a self-instructional manual discussing the ideas and concepts of BASIC. The manual is designed to have questions after most sections to insure the understanding of the reader. ~his technique is &nal.agous to the objectives of "tutorial instruction" mentioned in Chapter I. The purpose of the manual is not to have the remote terminal produce a manual for each student.
!he reasons being that the time spent on typing the manual -7gr eat and the cost of computer time is rather high. At is the conclusion of the manual are suggested problems for the student to try his problem-solving ability.
The second and third phases of the CAI system involve testing and recording student data by means of CMI. The second phase is a programmed examination covering material one needs to know in order to program in BASIC, whereas, the third phase has the student complete a program which is presented to him with errors and deletions. These two phases can be employed off-line as well as on-line.
For phase two, questions are chosen at random from a bank of questions which were supplied as data. The number of questions to be asked Qn the exam is a variable parameter which can be controlled by whoever is preparing the examinations . Once the student makes a response and enters it, it is checked and, if correct, another question is presented.
If on the first try an incorrect response is made, a second answer is allowed; however, if the correct answer has not been given after the second try, the correct answer is then given. At the end of the examination, a summary is given as to the number of questions answered correctly the first time, the number answered correctly the second time, and finally, those questions to which the correct answer had to be given.
A proficiency rating follows as to whether the student performed "excellent","good","fair", or "poor". Thus, the exams are graded for the teacher. A routine is incorporated to -sprovide the teacher with information about how each question in the library was answered.
The final phase of the CAI project is to have the student "debug" programs presented to him on the remote console.
He is to examine the coding (either on-line or off-line} and decide what changes need to be made. There a.re various types of changes the student must make. These changes are described in the next chapter. Once the changes are made, the student checks his work by running the corrected program and examining the results. It is very possible that he must make :further corrections due to his having missed an error or due to one of his corrections being incorrect. There are a number of these programs which may be prepared with varying

III. EXPLANATION OF CAI SYSTEM
The self-instructional manual entitled, "Self Instruction for BASIC Programming" was written primarily for the junior and senior high school student wanting to Chapter IV contains five problems which again were chosen so as Rot to present much difficulty to the reader. After each question, the student enters the response "l, 2, 3, or 4" corresponding to his choice. If any other character is entered, a message will appear indicating only a ~l, 2, 3, or 4" is a val.id response. If the choice is correct, the next question will appear; otherwise, the student is allowed a second try. This second try may not be the same response given the first time for the program checks to make sure two separate choices are made. If the second choice is also incorrect, the correct answer to the question will appear.
-12-A summary is given at the end of the examination indica-till8 how many questions were answered correctly the first tJ.me, how many the second time, and how many were answered unsuccessfUlly. A record is kept as to how each question was answered, allowing the instructor to view the data at his request and evaluate the questions in the examination. Followi.llg the summary is a proficiency rating indicating how well the student performed.
Should a student desire to repeat the examination, ten questions will again be chosen at random along with a new key. It is likely that a question or questions may appear that the student has already seen but, he will probably find the correct answer to be anether choice. !he nwn'ber "zero" is a valid designation for any of the Jaraaeters.
Class III statements are handled first. The parameter 'Cl.aaa3• causes a random process to begin whereby as many -14-S III statements are generated as specified by the c1as variable 11c1ass3". Each of the Class III statements generated are scanned for in each of the six programs seq~entially.
When the particular statement is encountered, the entire line 18 blanked, i.e., TYPEl change. All Class III statements are completely blanked out this way.
Class II statements are considered next. As was the case for Class III, randomly, statements of Class II are generated.
Each program is scanned for the Class II statement at hand and the changes made are in the order of Type III, Type II, and finally Type I. If a particular statement scanned for appears more than once, a random process ts employed to select one. For example, if the Class II statement generated were nREADn, the statement found in a program may be:  programs. Incorporated as data to the master program is a lilt of BASIC statements which are correct but if ~serted 1a &D1 of the six programs will cause errors to occur if untetected. !rb.e final parameter to be discussed is one indicat-iDB the number of these lines to be inserted in the preparation o! the six programs.
I! the number of irrelevant statements to be inserted i i tour, then four random numbers are generated between one and six, each representing one of the problems. If the random numbers generated were "l, 6, 2, 1," this would mean program •one" will get two lines replaced if possible and program "two" and "six", one each if possible. Otherwise, no replacement takes place.
It may be that just program "six" has not reached the ll&X1mum change parameter. If so, one line is chosen at ran-4oa from the data and all the statements like this one in program "six" are considered likely candidates to be replaced. If the statement chosen was a ."GOTO" statement, program six may contain three "GOTO" statements. One is chosen at random and replaced by the new "GOTO".
GOTO 17 (GOTO chosen .from list of statements randomly) GOTO 12 l GOTO 19 All located im program six . GOTO 24 GOTO 24 Chosen as one to be replaced by GOTO 17 -16-10 ,, statement "G.OTO 24" is replaced by "GOTO 17" thus 4~a an improper branch. All lines inserted causing ca•s..-c errors are handled this way.
Finally, a check is made to see if the six programs )lave reached their maximum number of changes. If not, a ican is made for "IF" and "FOR" statements in these programs where another change can be made. The equality/inequality •JJlbOl ~s removed from the "IF" statement and the starting, ending, and incrementing values from the "FOR" statement. short course to high school teachers. These short tor a es were taught at South Kingstown, Middletown, and 0 ours Portsmouth High Schools, one hour a week for four weeks !he text used in the course was the self-instructional manual of this project. MGst teachers were able to write programs by the second week. In their attempts to learn BASIC, they provided excellent criticisms of the manual which they were using. These helpful criticisms led to a later revision of the manual. The courses were s~ccessful since those completing it were able to program fairly well by the end of the fourth week.
Another workshop for higA school students was offered again during the summer of 1970 sponsored by the latest lational Science Foundation grant and University of Rhode Island Computer Laboratory. The students in this program were given an opportunity to use the entire CAI system to learn BASIC. Due to a time factor, the teachers participating in the short courses were only exposed to the selfinstructional manual.
The students were allowed one day to read the manual.
Once they finished and their questions answered, they were &&signed the eight problems in Appendix B of the manual.
!lie solutions to these problems raised more questions from the students and those questions were also resolved. Now, having done some programming, the students were ready for the second and third phases of the system.
-20-!fhe programmed examinations, as well as the unsolved problems, were a challenge to many. It was interesting to Ti•the students who were being tested in a new way. Critioisms drawn from the class at the end of the program indicated t]l&t they were very much in favor of being taught by a self-iBStructional manual and tested at a remote terminal.. This CAI project added to the success of the workshop whose prime ob~ective was to teach BASIC. This objective was more than aet.

INSTRUCTIONS FOR PREPARING PROGRAMS
In order to prepare an examination for a student, all one needs to do under the University of Rhode Island Computer Laboratory RAX System is to include the name "BASICX" in an 1.Dput file and run this file in the following manner. Type       In elementary BASIC as in many programming languages, variables are used to represent values we store in the computer for later calculations. If, for example, we wanted to compute the area of a circle, we would need to know the radius or diameter to which we would assign a name to hold the value.
In light of the fact that this radius or diameter will vary for different circles, we have the term "variable name". To create a valid variable name, we simply use a letter of the alphabet or a letter immediately followed by a digit from o -9. Thus in any program, there is a total of 286 possible variable names. There is another class of variables to which we may assign a subscript called "subscripted variables" {Section 2.16). Table 4    problems. There is one important fact that is common to all BASIC statements and that is each must have a statement number which must not exceed four digits. As we study each statement, you will find the statement number always appearing first. Most statements are referred to as "executable" statements; however, statements such as "END" and "DIM" are not executable.  and if the first two values had already been read, then the next variable in a READ statement would be assigned the value "3"· If, however, a RESTORE command were executed, the value assigned to the variable in the next READ statement would be "4" instead of "3".

PRINT
The PRINT statement is used to print out remarks and values assigned to variables. To print out the answer to a given problem whose solution is stored in X, one may code the The BASIC language assumes that any variable not previously defined has a value of "zero". Thus the programmer may initialize a variable to contain a "zero" by LET (variable) = 0 or completely omit this statement in which case the variable will be "zero".
The statements from the FOR to the NEXT statement are executed five times. The first time T will be assigned the value one and the fifth time, T is five. If the "STEP" were two, then the laop would be executed three times with T having values l, 3 and 5. You need not specify a STEP of l, i.e., "FOR T=l to 5" we assume STEP 1. The following is a solution to find the greatest common divisor of two numbers using Euclid's algorithm. Involved is a loop to handle more than one set of numbers. The following program will sort five numbers into descending order.  Multiply corresponding elements of matrix C by matrix B,storing results in matrix A.

INPUT
Multiply matrix C by the number (or expression) B and store results in matrix A.
Take the inverse of matrix B and store in matrix A.
Store the transpose of matrix B in matrix A.
Set all elements of matrix A to "l".
Set all elements of matrix A to "0".
Set matrix A to identity matrix (i.e., main diagonal elements are "1"; off-diagonal elements are "0") -B34-   an option on the ' for' statement Is the---·-p;-ir;lmeter . in a loop, one "1ay specify the Interva l slz1~ by the ::tep parameter. next ! f step none of these a ----statement is need e rl Jn orrler to use t he 'data' 1 ist more than once. t he 'restore' stat erient return!: the user to the ber,innlr.g of the data block. restore reread d.:ita input a ----causes short spacfnJ>; to the next elen ent. a co!"'1ma is for lor.r, srrn c ine; ann a s em i-colrF1 for short spacing, co~ma colon periorl semi-colon literals a~;-iear In 'print' state111e nts enclo s erl !n ----. ll tF?ral charcicter s mu s t ;ippeilr in quotation marks. commas apostrophe s quotes parenthesis for·----expressions , the val11e of the lnne 1 ·most express ion Is calcl!lated first expressions wi thin expressions are referrerl to as be in g 'nested'. two three four none of the s e a ----is a tyre of suhp r oP.ram . a subroutine i s clas s lflerl as a type of suhrrop; ra m. matrix gosub subrout i ne none of these a rem statement Is used to Insert ----into th e proRram re111 statements allow the prcgramme r to commen t his pror;ram. co~ments errors print outs clari ty one may define a maximum of ----functions. since 'function' statements must he fn anci a lctt er , 111ax . no . Is 26. five two one hm1rlred none of these the stop statement sl.r;nals end of ----• stop is user! to end execut I on of the nrop;ran;. cor1pilatlon exer:11tion print ln r; -re a rll np; data the maximum nurnher of eriua llty/in equa lity symhols a llowed per statement Is the 'I f ' statement 111ay have ~wo syrn hols. one three two none of these the statement numher that must follow 5tate m~nt 99 ls----• presently, statef"lent nu111bers need not be In sequence. one hunrlrerl ninety eight o ne none of these the slsn of the step Increment of a 'f0r' statement must he ----• the 'step' rarameter may he either positive or neP,ative. positive ne gati ve pos. or neR. no~e of t~ese I a \11 I a loop i s start0rl '" ith a 'for' anrl enderl with a ' next: ' staterm~nt.
use the 'l ess than ' anrl ·~reat e r than' symho l s . one two three none of these In ge ner al , rilvlsion alwR~s ha~ ~rlority ovfr ••• • , unlnss Dtherw!se ~nec ! F l erl , rllvlslon ha~ priority over addit ion and subtraction. exponent i a ti on multip lic at i on subtraction nona of these a val l rl basic varlah l e has a maximum of ----characters. variab l es may ha ve e ither one or two ch a racters hut never a ny more. f our three two one the 1 enrl' statement i s classiflerl as a ----stateme nt. ' en<l ' I s use<! to ha l t coi'lp ll a tl on anrl Is ter. 11ed 'non-executable'. non-executable executab l e termination none of th ese a ' print ' statement m~y pr i n t out only----. o ne may print out blank lines hy l nsertln.e: l; l a nl<s in the quotation marks. va ri a bles litera l s var s . anci lit s . none of the se a let statement ----contains an arithmetic syrnhol. arithmetic operat i ons ma y or may not ta ke pl 3ce In 'l et ' statements.   *** diagnostics *** "; k;" ls ";sar(k) "; k; ti Is ";sqr(-k);"I"