by Don Grout
II Alive Volume 1 Number 1
March / April 1993
Computer software exists for almost every educational application. There is software for science simulations, math drills, word processing, accounting simulations, history tests, geography, music, art, and foreign languages. But is there something inexpensive (or free) that an ordinary classroom teacher, with minimum computer skills, can use for one-on-one computer study or review in virtually any subject area? Absolutely-if you can enter data and have a little familiarity with the computer language BASIC, you can use the Classroom Test Shell.
The Classroom Test Shell, written in Applesoft BASIC, provides even inexperienced programmers with a framework for creating individualized student software. The shell has a four-section multiple choice base and was developed to simulate a driver-education test; however, with a little skill-and imagination it can be adapted for many other uses.
As its name implies, the program provides a “shell” into which your questions and answers can be inserted. In other words, the Classroom Test Shell contains all the programming you need; you can just change the data to change what the program does. The shell contains other parameters which may altered at your discretion, although the basic outline of the program should be kept intact to minimize confusion.
The shell design lets students start with any question they want to. Students may quit before the end of the program by typing “Q” followed by the “RETURN” key, and they receive a score based upon the results of the session when they quit or when they answer the last question. The software doesn’t keep savvy students from stopping the program and listing it to discover the answers, but then, this program is intended for study and review purposes- even if they do break in, they ‘ ll still learn the material.
The program was designed and written on an Apple lie running DOS 3.3, but the program will work on virtually any Apple model, and under ProDOS. To enter the program, first get into BASIC (either boot your System Master disk or some other disk with an option to “exit to BASIC,” or run BASIC.System from your hard drive). At the ‘T’ prompt, type the program exactly as shown all the way down to line 620, the beginning of the DATA statements. If you are using an un-enhanced IIe, you should keep the Caps Lock key down when entering the program (newer computers, including the enhanced lie, don’t care whether BASIC programs are typed in in upper or lower case.)
From line 620 on, you should accurately enter your own questions and answers into DATA statements. (The ones we’ve included are just samples and probably won’t be particularly useful to you.) Be careful- the format is critical, so follow the examples! First, type the line number followed by the word DATA.
Next, type the question followed by a comma. Then type the multiple choice answers each separated by a comma. Finally, type the answer. Make sure that each DATA statement has the same number of parts: a question, four choices, and an answer, with each part separated by a comma. Try to avoid using commas and colons as part of the question or answer; if you must use a comma or colon, enclose the entire part of the statement that contains the comma or colon in quotes (“). The comma that separates the parts of the statement goes outside the quotes.
You can enter as many questions as you want. Each question should be on a separate program line, and line numbers should start with 620 and increase by ten. That way, if you want to add a question in the middle of the sequence later, you can enter a line with a number that falls between two existing lines. The computer will automatically insert your new question in the appropriate place. The very last line you type should be: I 0000 DATA END OF TEST. This tells the program that it has reached the end of your questions when it is reading your questions.
When you’re done, use the SAVE command followed by a brief name (DRIVER.TEST or whatever) to save the program on disk. Remember, if you’re using ProDOS, you can use a maximum of fifteen letters, numbers, and periods in the name, which must start with a letter. Under DOS 3.3, your name must also start with a letter, but can be up to 30 characters long and can include anything but a comma. When you want to create a new test, load any existing test you’ve already created and type DEL 620,9999 to delete the questions. Now type in your new questions and answers, then save the new test under a new name. To actually use a test, use the RUN command followed by the name you saved the test under. Once you load a test into the computer’s memory using the RUN command, you can just type RUN by itself at the ‘T prompt to restart the program after it’s done. That’s all there is to it!
BELLS AND WHISTLES
Here’s a line-by-line explanation of the Classroom Test Shell, for those of you who feel comfortable in BASIC and want to enhance the program. The REM statements, lines I 00 through 250, introduce the program and state the variables for easy identification throughout the program. (REM is short for REMark and indicates that the line is a comment to be read by people, not by the computer. When typing in programs, you can usually leave out the REMs without affecting the operation of the program.)
Line 260 sets the screen to 80 columns from the normal 40 column mode. Line 270 completes the housekeeping. Lines 290 through 330 provide instructions for running the program. Line 340 gives the student the opportunity of starting with any question number. The score counters are set to zero by line 350. The core program begins with line 370, which reads the question. If the question is “END OF TEST,” we know we’re at the end of our data (we’ve either finished the test, or the student has specified a question number that’s too high). Line 380 reads the the multiple choices; the questions are printed in lines 400- 440. The student answers the question at line 450. We check for invalid answers and for a “Q” keypress in 460-470. If the answer is correct, line 480 advances the correct answer counter and sends the student on to the next question by way of line 510. If the student’s answer is incorrect, line 490 gives the student two more chances to answer the question (by checking for X<3, X being the number of times the student has already tried) before the answer is disclosed at line 500. Lines 510 and 520 are housekeeping lines and take care of advancing the question counter. The core program continues until the last question is answered or until the student types “Q”. Line 540 works in conjunction with the question start (lines 340 and 380) and comes into play if the student asks to start at a question number higher than data has been provided for. Lines 550 through 580 summarize the results and provide a percentage student score.
Customization can take place in a number of areas. First, the wording of the PRINT statements in lines 290 through 330, 480 through 500, and 560 through 580 may be changed, but be careful not to change anything outside the quote marks. In line 490, “X<3” controls the number of times the question is repeated before the answer is given and can be increased or decreased as desired. The timer in line 510, FOR T = I to 1000, can be adjusted by varying the number 1000. Finally, experienced BASIC programmers can add additional “bells and whistles” to make the program suit their individual needs.
The READ statements in lines 370 and 380 must contain six variables in total: the question (A$), four multiple choices (B$- E$), and the answer (F$). As mentioned above, each DATA sequence must contain the same parts: the question , four multiple choices, and the answer; each of the parts must also be separated by a comma. If you use any other commas (or colons) in the question or answers, you must place quotes around the part of the DATA statement that contains the comma or colon. If your tests don’t seem to be displaying properly, check your data statements for misplaced commas and colons.
The shell program is set up for a four-option multiple-choice test. It can be changed to other formats by modifying lines 370 and 380, 420 through 440, 480 (thr F$ variable), 500 (also the F$ variable), and the DATA statements, line 620 on. This is a task for someone fairly familiar with BASIC. Make sure you change everything so that the READ, DATA, and PRINT statements have the same number of elements, and so that the correct variables are being printed and checked!
BASIC provides an excellent vehicle for creating individualized student software with a minimum of computing skills. The Classroom Test Shell program is a framework within which you can design one-on-one computer tests and exercises for your students. The programs can be used as-is with the addition of subject-specific DATA, or the you can embellish the program to suit your individual and classroom needs. Either way, with a little work and a lot of imagination, the test shell can be a helpful classroom tool.
100 REM ************** CLASSROOM TEST SHELL ************** 110 REM ============= WRITTEN BY DON H. GROUT ============ 120 REM 130 REM VARIABLES 140 REM A$ QUESTION 150 REM B$ - E$ MULTIPLE CHOICES 160 REM F$ CORRECT ANSWER 170 REM G$ STUDENT ANSWER 180 REM S DETERMINES STARTING QUESTION 190 REM Q USED TO COUNT QUESTIONS WHEN STARTING 200 REM T TIMER VARIABLE 210 REM W QUESTION COUNTER 220 REM X QUESTION REPEAT COUNTER 230 REM Y CORRECT ANSWER COUNTER 240 REM Z PERCENT CORRECT 250 REM 260 NORMAL : TEXT : SPEED=255 : PRINT CHR$(4);"PR#3 ": PRINT 270 HOME : PRINT : PRINT 280 PRINT : RESTORE 290 PRINT "INSTRUCTIONS : SELECT THE BEST ANSWER FOR EACH QUESTION ." 300 PRINT "AFTER READING THE QUESTION , TYPE THE LETTER (A , B, C, OR D) " 310 PRINT "WHICH REPRESENTS YOUR ANSWER THEN PRESS THE ' RETURN ' KEY ." 320 PRINT : PRINT "YOU MAY LEAVE THE PROGRAM AT ANY TIME AFTER YOU BEGIN" 330 PRINT "BY TYPING 'Q' FOLLOWED BY THE ' RETURN' KEY ." 340 PRINT : INPUT "AT WHAT QUESTION WOULD YOU LIKE TO BEGIN? ";S 350 Q = O:U = O:W = O:X = O:Y 0 360 HOME : PRINT : PRINT 370 READ A$ : IF LEFT$ (A$,11) "END OF TEST " THEN GOTO 540 380 READ B$, C$, D$, E$, F$ : F$ LEFT$ (F$ , 1) 390 Q=Q+1 : IF Q < S THEN GOTO 370 400 PRINT "QUESTION " ; Q 410 PRINT : PRINT 420 PRINT A$ : PRINT 430 PRINT SPC(10) "A) " B$ : PRINT SPC(10) "B) " C$ 440 PRINT SPC(10) "C) " D$ : PRINT SPC(10) "D) " E$ : PRINT 450 INPUT "ANSWER? " ; G$ : G$ =LEFT$ (G$ , 1) : IF G$> "Z" THEN G$ = CHR$ (ASC(G$)-32) 460 IF G$ "Q" THEN GOTO 540 470 IF G$ < "A" AND G$ > "D" THEN PRINT "PLEASE ENTER A-D . ": GOTO 450 480 IF G$ = F$ THEN Y = Y + 1 : PRINT : PRINT "THAT ' S CORRECT !": GOTO 510 490 PRINT : X= X+ 1: IF X< 3 THEN PRINT "SORRY , TRY AGAIN . ": GOTO 450 500 PRINT "THE ANSWER IS " ; F$ : INPUT "PRESS RETURN "; G$ 510 FORT= 1 TO 1000 : NEXT T 520 X= 0 : W = W + 1 530 GOTO 360 540 IF W = 0 THEN PRINT "QUESTION NUMBER TOO HIGH . TRY AGAIN . " : GOTO 280 550 Z = INT (Y I W * 100 + 0 . 5) 560 PRINT : PRINT : PRINT "THAT IS ALL . YOU WERE ASKED "; U;" QUESTIONS ." 570 PRINT : PRINT "YOU ANSWERED ";Y;" QUESTIONS CORRECTLY . 580 PRINT: PRINT "YOUR SCORE IS " ;Z ;"%" 590 END 620 DATA DRIVING IS A, PRIVILEGE, NATURAL RIGHT, CONSTITUTIONAL RIGHT, BIRTH RIGHT , A 630 DATA THE POINT SYSTEM HAS BEEN ADOPTED IN ORDER TO, BE ABLE TO HIRE MORE PEOPLE, LIMIT THE NUMBER OF LICENSES ISSUED, IDENTIFY PEOPLE WHO BREAK LAWS REPEATEDLY, KEEP THE POLICE ALERT, C 640 DATA YOU MAY LOSE YOUR PRIVILEGE TO DRIVE BY, GETTING 10 POINTS WITHIN 2 YEARS, LENDING YOUR LICENSE TO SOMEONE , BEING CONVICTED OF DWI , ALL OF THE ABOVE , D 10000 DATA END OF TEST