Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50110/cgrade.tuk
There are 2 other files named cgrade.tuk in the archive. Click here to see a list.
1' NAME--CGRADE
2' DESCRIPTION--CUMMULATIVE GRADE PROGRAM
3' SOURCE--UNKNOWN
4' INSTRUCTIONS
5 REM ENTER IN LINE 2000 THE NUMBER OF STUDENTS IN YOUR CLASS (P),
6 REM THE NUMBER OF GRADES YOU HAVE GIVEN (G), AND A "1" IF YOU WANT
7 REM PRINT-OUT FOR ALL GRADES OR A "0" IF YOU WANT PRINT-OUT FOR
8 REM THE LAST GRADE ONLY.
9 REM
10 REM IN LINE 2001 ENTER THE WEIGHTS FOR EACH GRADE (SEPARATE
11 REM EACH WEIGHT BY A COMMA)
12 REM
13 REM IN LINE 2010 ENTER THE STUDENT NUMBER AND THE STUDENT NAME
14 REM IN LINE 2011 ENTER THE GRADES FOR THAT STUDENT.
15 REM REPEAT INPUTS IN LINES 13 AND 14 NUMBERING YOUR DATA LINES
16 REM 2020,2021,2030,2031, ETC.
17 REM THE FOLLOWING IS SAMPLE INPUT FOR A CLASS OF THREE STUDENTS
18 REM WHO HAVE FOUR GRADES EACH.  A "-1" INDICATES THAT THE STUDENT
19 REM WAS EXCUSED FROM THAT TEST.  IN THIS EXAMPLE YOU WISH TO
20 REM PRINT OUT FOR ALL TESTS:
21 REM    2000 DATA 3,4,1
22 REM    2001 DATA 1,1,5,2
23 REM    2010 DATA 539,BROWN
24 REM    2011 DATA -1,70,65,35
25 REM    2020 DATA 541,CHASE
26 REM    2021 DATA 35,80,43,30
27 REM    2030 DATA 543,DALLAS
28 REM    2031 DATA 35,60,35,50
29'
30' THIS PROGRAM WAS WRITTEN FOR STUDENT USE AT AMOS TUCK SCHOOL
31' OF HANOVER, N.H., WHICH DOES NOT ASSUME RESPONSIBILITY FOR
32' ITS ACCURACY.
33'
34' * * * * * * * * * * * MAIN PROGRAM * * * * * * * * * * * * * 
35'
39 DIM R(130,15),N(130),S(130),C(130),W(130),Z(15),S$(130)
40 DIM E(130)
50 READ P,G,Y
60 MAT READ Z(G)
70 FOR I = 1 TO P
80   READ N(I),S$(I)
90   LET C(I)=W(I)=0
100  FOR J = 1 TO G
110    READ R(I,J)
120    NEXT J
130  NEXT I
140 FOR I = 1 TO G
141   IF Y = 1 THEN 150
142   IF I<>G THEN 195
150  PRINT "GRADE";I;"WEIGHT";Z(I)
160  PRINT
170 PRINT "STU     NAME      RAW    STANDARD    WEIGHTED CUM ";
171 PRINT "TOT CLASS"
180 PRINT " NO              SCORE    SCORE          SCORE    WTS";
181 PRINT "  RANK"
190  PRINT
195  LET P1 = P
200  LET L1=L2=L3=L4=L5=L6=0
210  FOR J = 1 TO P
220   IF R(J,I)>-1THEN 250
230  LET P1 = P1-1
240   GO TO 270
250   LET L1 = L1+R(J,I)
260   LET L2 = L2+(R(J,I)^2)
270   NEXT J
280  LET M1 = L1/P1
290  LET V1 = (L2/P1)-((L1^2)/(P1^2))
300  LET D1 = SQR(V1)
310  LET P1 = P
320  FOR J = 1 TO P
330   IF R(J,I)>-1 THEN 390
340   LET S(J) = 99
350   IF W(J)>0 THEN 430
360   LET C(J) = 0
370   LET P1 = P1-1
380   GO TO 450
390   LET S(J) = (R(J,I)-M1)/D1
400   LET X = W(J)
410   LET W(J) = W(J)+Z(I)
420   LET C(J) = ((C(J)*X)+(S(J)*Z(I)))/W(J)
430   LET L3 = L3+C(J)
440   LET L4 = L4+(C(J)^2)
450   NEXT J
460  LET M2 = L3/P1
470  LET V2 = (L4/P1)-((L3^2)/(P1^2))
480  LET D2 = SQR(V2)
490  LET P1 = P
495  IF I = G THEN 500
496  IF Y=0 THEN 790
500  FOR J = 1 TO P
510   IF W(J)>0 THEN 550
520   LET E(J) = 0
530   LET P1 = P1-1
540   GO TO 610
550   LET E(J) = 1
560   FOR K = 1 TO P
570    IF C(J)>=C(K) THEN 590
580    LET E(J) = E(J)+1
590    NEXT K
610   PRINT N(J);S$(J);TAB(18);R(J,I);TAB(25);S(J);TAB(38);C(J);
611   PRINT TAB(51);W(J);TAB(56);E(J)
680   NEXT J
690  PRINT
700  PRINT "MEAN OF RAW SCORE";M1
710  PRINT "STD DEV OF RAW SCORE";D1
720  PRINT "STD DEV OF CUM SCORE";D2
725  PRINT
726  PRINT
790  NEXT I
800 FOR I = 1 TO P
810  FOR J = 1 TO P-1
820   IF C(J)>=C(J+1) THEN 980
830   LET B1 = N(J)
840   LET N(J) = N(J+1)
850   LET N(J+1) = B1
860   LET B$ = S$(J)
870   LET S$(J) = S$(J+1)
880   LET S$(J+1) = B$
890    LET B2 = C(J)
900   LET C(J) = C(J+1)
910   LET C(J+1) = B2
920   LET B3 = E(J)
930   LET E(J) = E(J+1)
940   LET E(J+1) = B3
980   NEXT J
990  NEXT I
991 PRINT "RANKED ORDERING"
992 PRINT
1000 PRINT " STU               WEIGHTED CUM CLASS"
1001 PRINT " NO      NAME          SCORE     RANK"
1010 PRINT
1020 FOR I = 1 TO P
1030  PRINT N(I);S$(I);TAB(18);C(I);TAB(31);E(I)
1040  NEXT I
1050 PRINT
1060 PRINT
1070 PRINT "REMINDER--BE CAREFUL TO MEET PERCENTAGE DISTRIBUTION"
1075 PRINT           "REQUIREMENTS"
2000 DATA 20,7,0
2001 DATA 1,1,5,5,2,2,2
2010 DATA 539,BROWN
2011 DATA -1,70,65,35,34,16,20
2020 DATA 541,CHASE
2021 DATA 35,80,43,30,-1,-1,17
2030 DATA 543,DALLAS
2031 DATA 35,60,35,50,7,14,15
2040 DATA 545,FALSTAFF
2041 DATA 35,55,67,38,26,15,14
2050 DATA 547,GIBSON
2051 DATA 60,43,38,38,32,15,12
2060 DATA 548,GROWTH
2061 DATA 85,26,60,44,28,17,13
2070 DATA 550,IGNATZ
2071 DATA 45,50,34,23,5,14,9
2080 DATA 552,JONES
2081 DATA 55,97,46,49,24,16,15
2090 DATA 554,KING
2091 DATA 100,82,48,48,19,14,16
2100 DATA 555,LOVE
2101 DATA 80,54,58,21,18,16,17
2110 DATA 557,MORTON
2111 DATA 60,23,87,45,39,12,-1
2120 DATA 559,NANCY
2121 DATA 90,86,77,62,6,11,17
2130 DATA 560,PEPPER
2131 DATA 30,36,50,58,15,10,12
2140 DATA 561,PRUNE
2141 DATA 30,41,69,56,40,14,18
2150 DATA 563,QUIRK
2151 DATA 60,27,46,38,35,15,14
2160 DATA 565,RASPUTIN
2161 DATA 85,85,42,32,27,12,16
2170 DATA 566,SASSYFRASS
2171 DATA 55,75,76,49,15,13,19
2180 DATA 568,TREMBLECHIN
2181 DATA 70,52,51,31,14,9,15
2190 DATA 569,UNDERHILL
2191 DATA 70,63,61,63,13,10,14
2200 DATA 571,WANDERLUST
2201 DATA 45,48,81,58,25,11,18
9999 END