Rabu, 22 Desember 2010

Two Comptuer Programs For The Language Student

Abstract:
Notebook computers, such as he TRS-80 Model 100 and the NEC 8201, provide both the students and the teacher with the unique opportunity of bringing into the classroom a truly portable, self-contained computer with integrated, non-volatile memory. Two programs that are useful to the language student and that take full advantage of the unique features of these computers are the Course Authoring Program, which allows the teacher to create computerized tutorial lessons without recourse to programming languages, and FLASH, a computerized flash card manipulator. Both programs utilize text files that are created by the computer's built-in editor and can, with minimal effort, be converted for implementation on any computer system for which a text editor and appropriate memory storage facility are available.

Perhaps more than most post-secondary disciplines, language study make frequent use of drill-and-practice exercises. In this article I shall present two powerful, yet simple, drill -and practice programs that are designed for implementation on both the TRS-80 Model 100 and the NEC 8201 computers. These programs, which I place in the public domain, can, with the aid of a modest knowledge of BASIC, be implemented on your own computer system. I have chosen the TRS-80 Model 100 (and the almost identical NEC 8201) for several reasons: they are small and light, having the shape, size, and weight of a medium-sized book; they have non-volatile memory, a built in text-editing program, and a high degree of program integration, enabling several programs to reside in memory simultaneously and to interact with each other. As the prices of such notebook computers decrease, they will no doubt become as common in university classrooms as pocket calculators are now. IF your computer system does not have the various facilities listed above, you will probably need the following hardware and software in order to make use of the programs described below: (1) a high-speed peripheral memory-storage device (such as a disk drive), and (2) a text-editing program that creates standard text files (such as a word-processing program).
THE COURSE-AUTHORING PROGRAM (CAP)
The first of the two programs, the Course Authoring Program (CAP), listed in Figure 1, is based on a simple algorithm (see program description and is of value to language study, though by no means restricted to it. The lesson consists of a series of text files, each of which must contain a question and answer set. In addition, the file may precede a question, or any desired number of questions may follow a given text. Each file name must be prefixed with the letter Q and the files must be numbered consecutively. The text editor will automatically give the suffix .DO to each of these files. In addition, the first file (Q 1.DO) must contain, as its first item, the total number of Q files in the lesson.
In writing the lesson, the author must enter the computer's built-in text-editing program and create the necessary files. The text editor requires a file name before the typing can begin, so the author must type in Q 1 and press ENTER.
20
Note the essential space between the letter Q (for Question) and the number 1 (for section 1). In the first line of the first file (Q 1.DO) the total number of files in this lesson must appear, followed by ENTER. (The maximum number of files per lesson is 17.) On the second line three correct answers to the question that will be contained in that file must appear. Use commas (and no spaces) to separate the answers. If there is only one correct answer, enter it three times. If there are two correct answers, enter one of them twice. There must be three answers on this line, or the program will not operate properly. The first of the three answers should be the preferred one, since the computer will show this answer to as student who answers incorrectly. It is advisable to enter the answers in upper-case letters. Later, when the student runs the program, the CAPS LOCK key should be depressed to help facilitate an answer match. Next, you may type in as much or as little text as desired. (By omitting the text, you may line up several questions in succession following the previous text page.) If there is too much text to view at once, the CAP program will present the text seven lines at a time on the computer's eight-line LCD screen. When the program is running, the student will turn the text pages by pressing ENTER. Text is optional; whether or not there is any text in the file, the file must be concluded with the question whose answers have already been typed in. At the end of the file press ENTER twice. Subsequent files (Q 2.DO, Q 3.DO, etc.) are created in the same way except that these files begin with the three answers to the current question; the section count is given only at the top of Q 1.DO.
When the several Q files have been completed and stored in non-volatile RAM memory under their designated names, one further file must be written in order to complete the lesson. It is a remediation page that will be shown to a student who achieves a score of less than 75%. This file must be named REMED.DO and should contain a review of the most important information relevant to the questions contained in the lesson. There must be no questions or answers in this file.
When creating a lesson, the author must keep tabs on the number of files in the finished lesson. In the TRS-80 Model 100, for example, there is room to store at least 19 files in memory in addition to the five built-in ROM programs. Thus, there is room for the CAP program, 17 Q files, and REMED.DO. A lesson of this length could contain 17 questions together with 17 or fewer text pages. By omitting text in one or more Q files, the author can line up any desired number of questions after a page of text. The total word length of the lessons depends on the memory capacity of the computer. A 32K TRS-80 Model 100 could support a CAP lesson approximately equal in length to a type-written, double-spaced 15-page text. On the average, therefore, a single Q file could contain approximately one such page. If there are fewer than 17 Q files containing text, each could contain proportionately more text.
When a student uses a lesson created by CAP, he or she need only remember to press ENTER to turn text pages and to enter typed-in answers to given questions. In this way the CAP program will move through the lesson in the order in which it is to be presented, keeping a record of the right and wrong responses to questions. A response is judged correct if one of the three correct answers is embedded within it. If, at the end of a lesson, the student's score is lower than 75%, the score will be shown to the student, and the remediation text will appear, after which only those Q files whose questions had been incorrectly answered will be reviewed, giving the student a second opportunity to answer the missed question. If the score is 75% or higher, the lesson will end before proceeding to the remediation text. (To change the cut-off percentage to some other number it is necessary only to alter the decimal fraction .75 in lines 340 and 600.) All necessary comments to the student are provided by the program.
CAP ROUTINES
10-620 main program
1000-1080 reads the text files
3000-3150 evaluates student's response
5000-5020 causes program to pause until a key is pressed
6000 prints message; ends program
CAP VARIABLES
M—number correct
S—number of questions (Q file)
S1—current question (Q file)
R—flag indicating remediation routine
M$—wrong answer marker (-X)
F$—current file's name
T—number of questions missed on first pass
A$—dummy variable for reading one character from file
D$—student's response A1$ correct answer
A2$—correct answer
A3$—correct answer
THE FLASH CARD PROGRAM (FLASH)
The second program, FLASH, listed in Figure 2, is a flash card manipulator designed to aid in the memorization of lists of vocabulary. Construction of a traditional set of flash cards is usually a tedious process, requiring the preparation of numerous small cards, which are then difficult to organize or store. This program allows the student to create a text file named WORDS.DO in which each line contains a pair of words: the foreign word followed by a comma followed by the English word (no spaces). Unlike most other flash card programs, FLASH repeats only those words that have been translated incorrectly. The same word will not appear twice in a row unless it has been incorrectly translated more than once.
The words are presented in a random order, the student first having decided whether to translate from English to the target language or vice versa. When a word is translated correctly, this is so indicated, and the program unmarks the word so that it will not
21
be repeated. When a word is missed, the correct translation is given. When only three or four words remain to be correctly identified, a delay of five to ten seconds between words may result as the program slows down somewhat, searching for the remaining words. When all words have been correctly translated, the program prints a message indicating the total number of words in the set (maximum: 50) and the number of attempts required by the student to identify them all. If these two numbers differ significantly, further practice is probably required. Each set of words may be stored on tape for future reference.
Program Description: FLASH
FLASH ROUTINES
100-150 main program
1000-1050 reads text file
2000-2080 asks which side of flashcard to show
3000-3030 marks all words so that they will be shown
4000-4030 prints word; receives student's input; evaluates response (4020-K$—unmarks words correctly identified)
5000-5030 selects next unidentified word; ends program after last word
6000-6020 selects a random number R, (142-148 seed the random number generator. These lines maybe omitted or replaced by RANDOMIZE.)
FLASH VARIABLES
R—random number R1 the previous random number TR number of attempts
AA$—foreign (target) word
BB$—English (native) word
K$—marker identifying words to be reviewed (-X)
MX—number of words in file
AN$—student's response
J—dummy loop variable
Advantages of Notebook Computers
Editing or modifying existing files on computers such as the TRS-80 Model 100 or the NEC 8201 is a simple procedure, utilizing the powerful editing capabilities of the built-in text editor. For computers lacking built-in editors, the programs as listed here can be easily modified to be used on any computer for which a satisfactory editing mode is available. For example, word processing programs on larger computers could be used to create the necessary files, which could then be stored on disk and read successively into the computer's memory by a specially designed subroutine. But the integrated memory of the two notebook computers mentioned in this article eliminates the need for expensive, noisy, and slow memory storage devices such as disk drives. Within integrated memory the program operates much more smoothly and rapidly than in conventional memory, for which peripheral storage devices such as disk drives are needed.
A further advantage of the two notebook computers referred to here is that elaborate graphic characters can be created within text mode. The built-in character generator of the TRS-80 Model 100, for example, can display up to 255 characters including symbols from mathematics and the sciences, as well as umlauts, accents, and other characters needed in the transcription of several European languages. In addition, lines, boxes, blocks, and other figures may be constructed out of characters included in the graphics set an entered into text files as easily as text itself.
Once the necessary files and programs are residing in the non-volatile RAM memories of these notebook computers, the information will be retained, even when the computer's power is switched off. When it becomes necessary to remove them from memory in order for other lessons to be loaded or for the computer to be used for other purposes, the files can easily be saved on cassette tape.
Editor's Note: See page 23 for the listings for Mr. Roseberry's programs.
22
COURSE AUTHORING PROGRAM
by Robert L. Roseberry
10 CLEAR 500
15 M=0:K$="CORRECT!":W$="WRONG":S1=1:R=0
25 DIM M$(18)
50 S$=STR$(S1)
120 F$="Q"+S$+".DO"
130 GOSUB 1000
140 GOSUB 3000
300 S1=S1+1
305 S$=STR$(S1)
330 IF S1<=S THEN GOTO 50
340 IF M/S >=.75 THEN GOTO 6000
345 CLS
350 PRINT "HERE IS YOUR SCORE:"
360 PRINT
370 PRINT "YOU HAVE";M;" QUESTIONS RIGHT OUT OF A"
380 PRINT "TOTAL OF";S;" QUESTIONS."
390 PRINT:PRINT:PRINT "NOW FOR A BRIEF REVIEW."
395 GOSUB 5000
400 F$="REMED.DO":R=1
410 GOSUB 1000
415 GOSUB 5000:CLS
420 M=0:T=0
430 S1=1
435 IF M$(S1)="X" THEN T=T+1:F$="Q"+STR$(S1)+".DO":GOTO 462
440 S1=S1+1
450 IF S1>S THEN 600
460 GOTO 435
462 GOSUB 1000
465 GOSUB 3000
590 GOTO 440
600 IF M/T>=.75 THEN CLS: GOTO 6000
610 PRINT@120, "MORE PRACTICE IS NEEDED."
620 END
1000 CLS
1010 OPEN F$ FOR INPUT AS 1
1015 IF LEFT$(F$,3)="Q 1" THEN INPUT#1,S
1017 IF LEFT$(F$,1)="Q" THEN INPUT#1,A1$,A2$,A3$
1020 IF EOF (1) THEN 1070
1030 A$=INPUT$(1,1)
1040 IF POS(0)>30 THEN IF A$=CHR$(32) THEN A$=CHR$ (13) + CHR$ (10)
1050 PRINT A$;
1055 IF CSRLIN=7 THEN GOSUB 5000
1060 GOTO 1020
1070 CLOSE
1080 RETURN
3000 LINE INPUT D$
3010 L1=LEN(A1$)
3020 L2=LEN(A2$)
3030 L3=LEN(A3$)
3040 LL=LEN(D$)
3050 FOR Z=1 TO LL
3060 IF MID$(D$,Z,L1)=A1$ THEN PRINT K$:M=M+1:GOSUB 5000: IF R=1 THEN 440 ELSE 300
3070 NEXT Z
3080 FOR Z=1 TO LL
3090 IF MID$(D$,Z,L2)=A2$ THEN PRINT K$:M=M+1:GOSUB 5000:IF R=1 THEN 440 ELSE 300
3100 NEXT Z
3110 FOR Z=1 TO LL
3120 IF MID$(D$,Z,L3)=A3$ THEN PRINT K$:M=M+1:GOSUB 5000: IF R=1 THEN 440 ELSE 300
3130 NEXT Z
3140 PRINT W$:PRINT "SUGGESTED ANSWER";A1$;"'.":M$ (S1)="X": GOSUB 5000
3150 RETURN
5000 R$=INKEY$:IF R$=" " THEN 5000
5010 CLS
5020 RETURN
6000 CLS: PRINT@120, "WELL DONE, THIS LESSON IS OVER.":END
FLASHCARD PROGRAM
by Robert L. Roseberry
100 CLEAR 2000
105 R=0:TR=0
110 DIM AA$(50):DIM BB$(50):DIM K$(50)
120 GOSUB 1000
130 GOSUB 2000
140 GOSUB 3000
142 SEC=VAL (RIGHT$(TIME$,2))
144 FOR I=1 TO SEC
146 DUMMY=RND(1)
148 NEXT I
150 GOSUB 6000
160 IF K$(R)="X" THEN GOTO 4000 ELSE GOTO 5000
1000 OPEN "RAM:WORDS.DO" FOR INPUT AS 1
1010 MX=0
1020 IF EOF(1) THEN RETURN
1025 MX=MX+1
1030 INPUT#1,AA$(MX),BB$(MX)
1050 GOTO 1020
2000 CLS
2010 PRINT@50, "GO FROM --"
2020 PRINT@132, "1 - TARGET TO NATIVE"
2030 PRINT@172, "2 - NATIVE TO TARGET"
2040 PRINT@252, "(1 OR 2)";
2050 INPUT Q$
2060 Q=VAL(Q$)
2070 IF Q<1 OR Q>2 THEN 2000
2080 RETURN
3000 FOR J=1 TO MX
3010 K$(J)="X"
3020 NEXT J
3030 RETURN
4000 IF Q=1 THEN PRINT AA$(R) ELSE PRINT BB$(R)
4003 TR=TR+1
4005 PRINT
4010 INPUT AN$
4014 LA=LEN(AA$(R))
4015 LB=LEN(BB$(R))
4016 L=LEN(AN$)
4017 J=1
4020 IF AA$(R)=MID$(AN$,J,LA) OR BB$(R)=MID$(AN$,J,LB) THEN PRINT "RIGHT":PRINT:K$(R)=" ":GOTO150
4025 J=J+1:IF J<=L THEN GOTO 4020
4030 PRINT AA$(R); " MEANS "; BB$(R):PRINT:GOTO 150
5000 J=1
5010 IF K$(J)="X" THEN 150
5020 J=J+1:IF J<=MX THEN GOTO 5010
5025 PRINT "YOUR REQUIRED";TR;"TRIES"
5027PRINT "TO IDENTIFY";MX;"WORDS."
5030 END
6000 R1=R:R=INT(MX*RND(1))+1
6010 IF R=R1 THEN 6020
6020 RETUERN
23

Tidak ada komentar:

Posting Komentar