-
Notifications
You must be signed in to change notification settings - Fork 5
/
TEST2.BAS
150 lines (150 loc) · 5.81 KB
/
TEST2.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
5 CLS
10 'THIS SECTION RESERVED FOR SET UP INFORMATION
11 START$ = TIME$
20 OPTION BASE 1 : DIM ANS$(2) : DIM A$(100) : DIM TEST$(50) : DIM RIGHT(50) : DIM TRIED(50) : DIM NAM$(50) :DIM CHECK$(60) : DIM ITEM(60)
21 DIM ID$(10) : DIM IDN$(10)
22 DATA "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"
23 DATA "A", "B", "D", "H", "P", "Q", "R", "T", "X", "`"
24 FOR X = 1 TO 10 : READ IDN$(X) : NEXT X
25 FOR X = 1 TO 10 : READ ID$(X) : NEXT X
40 OPEN "COM1:9600,N,8,2,CS0,DS0" AS #1
50 STATUS = INP(&H3FD)
200 'THIS SECTION RESERVED FOR INSTRUCTIONS AND QUESTIONS
205 PRINT "***** PLEASE MAKE SURE THE THE EQUIPMENT IS SET AS FOLLOWS"
210 PRINT " 1. [CAPS LOCK] SHOULD BE ON
215 PRINT " 2. THE SWITCHES ON THE SCAN-TRON SHOULD BE AS FOLLOWS"
220 PRINT " A. [READ 12]
225 PRINT " B. [POWER ON]
230 PRINT " C.
235 PRINT " D.
240 PRINT " E. [ON LINE]
245 PRINT " 3. THE PRINTER SHOULD BE ON AND ON LINE"
246 PRINT " 4. TYPE THE WORD ' END ' NOW TO END THE PROGRAMS
250 INPUT"WHAT IS THE TEACHERS NAME"; TEACHER$
251 IF TEACHER$ = "END" OR TEACHER$ = "end" OR TEACHER$ = "End" THEN 253
252 GOTO 260
253 SYSTEM
254 END
260 INPUT"WHAT CLASS IS THIS FOR"; CLASS$
300 INPUT "HOW MANY QUESTIONS ARE ON THIS TEST";NUMB
310 INPUT "DO YOU WANT TO USE [1] NAMES OR [2] ID NUMBERS"; ID
320 INPUT "DO YOU WANT TO SCORE BY [1] # POSSIBLE OR [2] # TRIED "; SC
330 INPUT "DO YOU WANT TO SAVE DATA TO DISK [Y] OR [N]"; DIS$
340 IF DIS$ = "N" OR DIS$ ="n" THEN 500
350 PRINT "*** PLEASE PLACE A FORMATED DATA DISK IN DRIVE B ***"
360 INPUT "PLEASE ENTER A FIVE LETTER FILE NAME "; FILE$
370 IF LEN (FILE$) > 8 THEN 360
380 FI$ = "B:"+FILE$+".TDA"
390 OPEN "O", 2, FI$
500 'THIS SECTION RESERVED FOR KEY LOADING AND VERIFICATION
510 CLS
520 PRINT "****** FEED YOUR ANSWER KEY WHEN YOU HEAR THE BEEP ******"
530 PRINT #1, CHR$(17)
540 LINE INPUT#1, ANS$(1)
550 PRINT "****** NOW FEED THE KEY A SECOND TIME ******"
560 PRINT #1, CHR$(17)
570 LINE INPUT#1, ANS$(2)
580 IF ANS$(1) = ANS$(2) THEN 700
590 BEEP
591 CLS
600 PRINT "I SEEM TO DETECT A PROBLEM"
610 PRINT "PLEASE CHECK THE MARKS ON YOUR KEY"
620 PRINT "AND TRY AGAIN"
630 INPUT "PRESS ENTER TO CONTINUE";XX
640 GOTO 530
700 FOR X = 23 TO (NUMB + 11)*2 STEP 2
710 A$((X+1)/2-11) = MID$(ANS$(2),X,1)
720 PRINT((X+1)/2-11);"-";
730 B$ = A$((X+1)/2-11)
740 A$ = B$
750 IF B$ = "P" THEN A$ = "E"
760 IF B$ = "H" THEN A$ = "D"
770 IF B$ = "D" THEN A$ = "C"
780 PRINT A$,
785 CHECK$((X+1)/2-11) = A$
790 NEXT X
800 INPUT "CHECK YOUR KEY AND PRESS ENTER TO CONTINUE"; XX
900 CLS
1000 'THIS SECTION RESERVED FOR TEST READING
1010 PRINT "****** FEED TESTS ONE AT A TIME AS THE MACHINE BEEPS ******"
1020 PRINT "****** PRESS [REKEY] AFTER THE LAST TEST ******"
1030 COUNT = COUNT + 1
1035 PRINT COUNT;
1040 PRINT #1, CHR$(17)
1050 LINE INPUT #1, TEST$(COUNT)
1060 IF TEST$(COUNT) = "!" THEN 1500
1070 GOTO 1030
1500 ' THIS SECTION RESERVED FOR SCORING
1503 CLS
1505 PRINT
1510 PRINT "I AM NOW GOING TO SCORE YOUR TESTS, I MAY BE BUSY FOR A WHILE"
1511 LPRINT " TEACHER'S NAME "; TEACHER$
1512 LPRINT " CLASS "; CLASS$
1514 LPRINT " ", "********** TEST SCORES *************"
1516 ON SC GOTO 1517, 1518
1517 LPRINT "TESTS SCORED BY NUMBER RIGHT / NUMBER POSIBLE" : GOTO 1519
1518 LPRINT "TESTS SCORED BY NUMBER RIGHT / NUMBER TRIED" : GOTO 1519
1519 LPRINT " ", "NAME", "# TRIED", "# RIGHT", "PERCENT
1520 COUNT = COUNT - 1
1521 HIGH = 0
1522 LOW = 100
1530 FOR X = 1 TO COUNT
1540 FOR Y = 1 TO (NUMB + 11)*2 STEP 2
1550 IF (Y+1)/2 >11 THEN 1600
1551 IF ID = 1 THEN 1559
1552 FOR CC = 1 TO 10
1553 IF MID$(TEST$(X),Y,1) = ID$(CC) THEN NAM$(X) = NAM$(X) + IDN$(CC)
1554 NEXT CC
1555 GOTO 1570
1559 IF MID$(TEST$(X),Y,1) = "@" THEN NAM$(X) = NAM$(X) + " " : GOTO 1570
1560 NAM$(X) = NAM$(X) + MID$(TEST$(X),Y,1)
1570 GOTO 1615
1600 IF MID$(TEST$(X),Y,1) = MID$(ANS$(2),Y,1) THEN RIGHT(X) = RIGHT(X)+1
1605 IF MID$(TEST$(X),Y,1) = MID$(ANS$(2),Y,1) THEN 1610
1606 ITEM((Y+1)/2-11) = ITEM((Y+1)/2-11) + 1
1610 IF MID$(TEST$(X),Y,1) <> "@" THEN TRIED(X) = TRIED(X) + 1
1615 NEXT Y
1616 IF SC = 1 THEN 1619
1617 Q = TRIED(X)
1618 GOTO 1620
1619 Q = NUMB
1620 LPRINT X, NAM$(X),TRIED(X), RIGHT(X), INT((RIGHT(X)/Q)*100);"%"
1621 IF INT((RIGHT(X)/Q)*100) > HIGH THEN HIGH = INT((RIGHT(X)/Q)*100)
1622 IF INT((RIGHT(X)/Q)*100) < LOW THEN LOW = INT((RIGHT(X)/Q)*100)
1623 TOTAL = TOTAL + INT((RIGHT(X)/Q)*100)
1624 IF DIS$ = "N" OR DIS$ = "n" THEN 1640
1625 PRINT #2, NAM$(X)
1626 PRINT #2, TRIED(X)
1627 PRINT #2, RIGHT(X)
1628 PRINT #2, INT((RIGHT(X)/Q)*100)
1640 NEXT X
1650 IF COUNT > 20 THEN LPRINT CHR$(12)
1651 LPRINT " "
1660 LPRINT" ","TEACHERS NAME "; TEACHER$
1670 LPRINT" ","CLASS "; CLASS$
1690 LPRINT" ", "********** KEY VALIDATION **********"
1700 FOR X = 1 TO 50 : LPRINT X;"-";CHECK$(X),:NEXT X : LPRINT
1800 LPRINT " ", "********** ITEM ANALISYS **********"
1810 FOR X = 1 TO 50 : LPRINT X;"-";ITEM(X), : NEXT X : LPRINT
1820 LPRINT " ", "********** STATISTICS **************"
1821 LPRINT " TOTAL NUMBER OF TESTS: "; COUNT
1822 LPRINT " TOTAL NUMBER OF ITEMS: "; NUMB
1830 LPRINT " RANGE ";LOW; " TO "; HIGH
1840 LPRINT " AVERAGE " INT(TOTAL/COUNT)
1850 LPRINT " DATE " DATE$
1855 LPRINT " START TIME " START$
1860 LPRINT " END TIME " TIME$
2000 LPRINT CHR$(12)
2010 CLS
2020 BEEP
2021 IF DIS$ = "N" OR DIS$ = "n" THEN 2030
2022 PRINT #2, "END"
2030 BEEP
2040 PRINT"********************* I AM FINISHED NOW ******************"
2050 PRINT "******************* PRESS [F2] TO DO MORE*****************"
2051 E$ = TEACHER$ + " " + DATE$ + " " + TIME$
2052 OPEN "A", 3, "TESTS.LOG"
2053 PRINT #3, E$
2060 CLOSE
2069 RUN
2070 END