190 DATA Easy Grader - Course Selector,Enter Student Names,Edit Student Names,Enter New Grades,Spreadsheet of Grades,Print Grade Info. to Printer,End
200 IF T = 2 THEN P = 27: RETURN
204 IF T = 1 THEN P = 0: RETURN
207 IF T = 0 THEN P = 54: RETURN
210 VTAB D: POKE 1403,P: PRINT " ": RETURN
212 IF E = 1 AND CNT = 1 THEN CNT = 0:I = 0: GOTO 238
213 HOME : VTAB 11: POKE 1403,20: PRINT "Please stand by while I delete the name.": IF NG >0 THEN VTAB 13: POKE 1403,10: PRINT "There are grades in the memory, so this might take a while."
214 IF E = CNT THEN 235
216 FOR I = E TO CNT -1
218 N$(I) = N$(I +1)
220 IF NG = 0 THEN 230
222 FOR T = 0 TO NG
224 G(I,T) = G(I +1,T)
226 NEXT T
230 NEXT I
235 N$(CNT) = "": IF NG >0 THEN FOR I = 0 TO NG:G(CNT,I) = 0: NEXT I
236 CNT = CNT -1
238 SA = 1: RETURN
295 ONERR GOTO 385
296 HOME : VTAB 11: POKE 1403,21: PRINT "Please stand by while I load the data.": VTAB 13: POKE 1403,28: PRINT "This might take a while."
455 FOR E = 0 TO NG: FOR I = 0 TO CNT: PRINT G(I,E): NEXT
460 IF E >0 THEN PRINT G$(E)
465 NEXT
470 PRINT CHR$(4);"CLOSE"
490 SA = 0: RETURN
500 DIM MU$(16),V(6),N$(50),G(50,40),G$(40),P(50)
505 HOME
510 VTAB 11: POKE 1403,21: PRINT "Please stand by while I load the data."
515 PRINT CHR$(4);"OPEN SEUG"
520 PRINT CHR$(4);"READ SEUG"
525 INPUT RC$
530 INPUT NC
535 INPUT TN$
540 IF NC = 0 THEN 560
545 FOR I = 1 TO NC
550 INPUT MU$(I)
555 NEXT I
560 PRINT CHR$(4);"CLOSE SEUG"
562 MU$(0) = "Easy Grader Master": FOR I = (NC +1) TO (NC +7): READ MU$(I): NEXT I
570 HOME : IF NC = 0 THEN VTAB 11: POKE 1403,11: PRINT "There are no courses to enter students and/or grades for.": VTAB 12: GOSUB 3: PRINT CHR$(4);"-DP.EASY.MASTER"
572 IF Z < > -23 THEN 1500
580 M = 1:Z = 0
590 IF M = 1 THEN S = 1:F = NC:T = 27:E = 0: GOSUB 6
592 IF M = 2 THEN S = (NC +1):F = (NC +7):T = 23:E = 1:D = 10
599 HOME
600 IF M = 1 THEN V(1) = 1:V(2) = 6:V(3) = 19:V(4) = 23:NV = 4: GOSUB 20: VTAB 3: POKE 1403,13: PRINT "E A S Y G R A D E R - C O U R S E S E L E C T O R": VTAB 5: POKE 1403,25: PRINT "Press [CONTROL] - [E] to End."
602 IF M = 2 THEN V(1) = 1:V(2) = 8:V(3) = 18:V(4) = 22:NV = 4: GOSUB 20: VTAB 3: POKE 1403,29: PRINT "E A S Y G R A D E R": VTAB 4: POKE 1403,38: PRINT "BY": VTAB 5: POKE 1403,30: PRINT "Donpaul C. Stephens": VTAB 7: POKE 1403,8: PRINT "Grades for: ";TN$;" Course: ";K$
610 IF M = 1 THEN VTAB (D -1): POKE 1403,T: PRINT "0 -> ";MU$(0)
630 FOR I = C TO F:N = N +1: POKE 1403,T: PRINT N;" -> ";MU$(I): NEXT
650 IF M = 1 THEN VTAB 21: POKE 1403,12: PRINT "PRESS [RETURN] TO ACCEPT THE HIGHLIGHTED COURSE/OPTION ";: GET A$: IF A$ = CHR$(13) THEN PRINT " ": GOTO 790
655 IF M = 2 THEN VTAB 20: POKE 1403,16: PRINT "PRESS [RETURN] TO ACCEPT THE HIGHLIGHTED OPTION ";: GET A$: IF A$ = CHR$(13) THEN PRINT " ": GOTO 790
670 C = ASC(A$)
672 IF M = 1 AND C = 5 THEN 820
680 IF C = 11 OR C = 8 OR C = 45 THEN 710
690 IF C = 21 OR C = 10 OR C = 43 THEN A$ = STR$(A +1): IF VAL(A$) >N THEN A$ = STR$(E)
700 GOTO 720
710 A$ = STR$(A -1): IF VAL(A$) > = E THEN 720
715 A$ = STR$(N)
720 IF ASC(A$) < ASC( STR$(E)) OR ASC(A$) > ASC( STR$(N)) THEN A$ = " "
730 PRINT A$
740 IF VAL(A$) = (A) THEN 790
750 IF ASC(A$) < ASC( STR$(E)) OR ASC(A$) > ASC( STR$(N)) THEN 650
795 HOME : VTAB 11: POKE 1403,8: PRINT "Are you sure you want to go to the Easy Grader Master (Y or N)?";: GET A$: PRINT A$: IF A$ = "Y" OR A$ = "y" THEN PRINT CHR$(4);"-DP.EASY.MASTER"
800 GOTO 580
810 KN = A:K$ = MU$(A):M = 2: GOTO 295
820 HOME : VTAB 11: POKE 1403,13: PRINT "Are you sure you want to leave this program (Y or N)?";: GET A$: PRINT A$: IF A$ = "Y" OR A$ = "y" THEN PRINT CHR$(4);"BYE"
1030 VTAB 11: POKE 1403,21: PRINT "Please stand by while I sort the data.": IF NG >0 THEN VTAB 13: POKE 1403,10: PRINT "There are grades in the memory, so this might take a while."
1580 VTAB 11: POKE 1403,19: PRINT "Current number of graded items on file: ";NG
1585 IF NG >39 THEN VTAB 16: POKE 1403,8: PRINT "I am sorry, but this program only keeps track of 40 graded items": VTAB 17: POKE 1403,30: PRINT "per marking period.": VTAB 19: GOSUB 3: GOSUB 400:M = 2: GOTO 590
1590 NG = NG +1
1600 IF NG <10 THEN VTAB 18: POKE 1403,32: PRINT "(default - GI0";NG;")"
1605 IF NG >9 THEN VTAB 18: POKE 1403,32: PRINT "(default - GI";NG;")"
1660 VTAB 8: POKE 1403,13: PRINT "Please enter the total points in the graded item: ";G$(NG)
1670 D = 13:T = 38:A = 4:C = 4: GOSUB 30
1680 IF E$ = "" AND B$ = CHR$(27) THEN G$(NG) = "":NG = NG -1: GOSUB 400:M = 2: GOTO 590
1685 G(0,NG) = VAL(E$)
1690 IF G(0,NG) = 0 THEN PRINT CHR$(7);: VTAB 19: POKE 1403,14: PRINT "This total is zero, is this a valid total (Y or N)?";: GET A$: PRINT " ": VTAB 19: CALL -868: IF A$ < >"Y" AND A$ < >"y" THEN VTAB 13: CALL -868: GOTO 1670
1700 IF G(0,NG) <0 THEN PRINT CHR$(7);: VTAB 19: POKE 1403,12: PRINT "This total is negative, is this a valid total (Y or N)?";: GET A$: PRINT " ": VTAB 19: CALL -868: IF A$ < >"Y" AND A$ < >"y" THEN VTAB 13: CALL -868: GOTO 1670
1790 IF E$ = "" AND B$ = CHR$(27) THEN GOSUB 400:M = 2: GOTO 590
1797 G(E,NG) = VAL(E$)
1800 IF G(E,NG) >G(0,NG) THEN PRINT CHR$(7);: VTAB 19: POKE 1403,5: PRINT "This grade is above the total amount of points alloted for this item,": VTAB 20: POKE 1403,24: PRINT "is this a valid grade (Y or N)?";: GET A$: PRINT " ": VTAB 19: CALL -868: VTAB 20: CALL -868
1810 IF G(E,NG) <0 THEN PRINT CHR$(7);: VTAB 20: POKE 1403,11: PRINT "This grade is below zero, is this a valid grade (Y or N)?";: GET A$: PRINT " ": VTAB 20: CALL -868
1820 IF (G(E,NG) >G(0,NG) OR G(E,NG) <0) AND (A$ < >"Y" AND A$ < >"y") THEN VTAB 17: CALL -868: GOTO 1780
1825 G(E,0) = G(E,0) +G(E,NG):A$ = "": VTAB 14: CALL -868: VTAB 17: CALL -868: IF E <CNT THEN E = E +1: GOTO 1770
1830 VTAB 14: POKE 1403,7: PRINT "Grades have been entered for all students currently on record for": VTAB 16: POKE 1403,17: PRINT "taking this course for the graded item, ";G$(NG);"."
1835 E = 0
1840 VTAB 18: POKE 1403,8: PRINT "Do you wish to enter another new grade for this course (Y or N)?";: GET A$: PRINT " ": IF A$ < >"Y" AND A$ < >"y" THEN GOSUB 400:M = 2: GOTO 590
1855 GOTO 1540
1900 HOME : IF CNT = 0 THEN VTAB 11: POKE 1403,15: PRINT "There are no names to display on the spreadsheet.": VTAB 12: GOSUB 3: GOSUB 400:M = 2: GOTO 590
1910 IF NG = 0 THEN VTAB 11: POKE 1403,11: PRINT "There are no grades to display or edit on the spreadsheet.": VTAB 12: GOSUB 3: GOSUB 400:M = 2: GOTO 590
2400 VTAB 2: POKE 1403,15: PRINT "Please stand by while I calculate the percentages."
2402 FOR I = 1 TO CNT
2403 IF NOT G(0,0) THEN P(I) = 100: GOTO 2407
2405 P(I) = ( INT((G(I,0)/G(0,0)) *10000))/100
2407 NEXT I
2409 VTAB 3: PRINT : VTAB 2: CALL -868:Z = 0
2410 VTAB 1: POKE 1403,13: PRINT "Use letters, arrows or +/- keys to view the grade items.": VTAB 2: POKE 1403,0: PRINT "Press: [ESC] for main menu, [CONTROL] - [B] to go back to the grade spreadsheet."
2415 IF Z = 0 THEN 2450
2420 C = V(1) -1
2425 V(6) = 0
2430 FOR I = 8 TO 24 STEP 2
2435 C = C +1: VTAB I: POKE 1403,0: PRINT N$(C);: IF C = CNT THEN V(6) = I:I = 24
2708 N = V(0): POKE 34,6: HOME : POKE 34,0: GOTO 2420
2750 HOME : IF CNT = 0 THEN VTAB 11: POKE 1403,13: PRINT "There are no names to print out grade information for.": VTAB 12: GOSUB 3:M = 2: GOTO 590
2760 IF NG = 0 THEN VTAB 11: POKE 1403,8: PRINT "There are no grades in memory for course: ";K$: VTAB 12: GOSUB 3:M = 2: GOTO 590
2770 VTAB 11: POKE 1403,2: PRINT "In order to Print the Grade Information to a Printer, one must be connected.": VTAB 12: POKE 1403,12: PRINT "Is there a printer connected to this computer (Y or N)?";: GET A$: PRINT : IF A$ < >"Y" AND A$ < >"y" THEN M = 2: GOTO 590
2780 HOME : VTAB 2: POKE 1403,15: PRINT "Please stand by while I calculate the percentages."
2790 FOR I = 1 TO CNT
2795 IF NOT G(0,0) THEN P(I) = 100: GOTO 2810
2800 P(I) = ( INT((G(I,0)/G(0,0)) *10000))/100
2810 NEXT I
2815 A$ = ""
2820 PRINT : VTAB 2: CALL -868
2830 VTAB 11: POKE 1403,8: PRINT "Please turn the printer on and press any key to begin printing.";: GET A$: PRINT
2835 IF A$ = CHR$(27) THEN A$ = "": GOTO 3000
2837 A$ = ""
2840 VTAB 11: CALL -868
2850 VTAB 11: POKE 1403,30: PRINT "Printing in process."