Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50110/teach.uti
There are 2 other files named teach.uti in the archive. Click here to see a list.
10000'  NAME--TEACH-
10010'
10020'  DESCRIPTION--A SKELETON TEACH PROGRAM. 
10030'
10040'  SOURCE-- JOHN G. KEMENY (MODIFIED BY KIEWIT CENTER)
10050'
10060'  INSTRUCTIONS--THIS PROGRAM USES VARIABLES AS FOLLOWS:
10070'  $9 (ONE MORE THAN THE NUMBER OF PASSES THRU PROGRAM)
10080'  $7 (NO. OF TIMES YOU WISH TO GO TO STUDENT PROGRAM)
10090'  $8 (USED IN CHECKING THE AMOUNT HE READS)
10100'  READ EACH OF THE REMS STARTING IN LINE 10160 AND INSERT
10110'  INSTRUCTIONS IMMEDIATELY FOLLOWING THE REM, WHEREVER APPROPRIATE.
10120'
10130'
10140'  *  *  *  *  *  *  *  *  MAIN PROGRAM  *  *  *  *  *  *  *  *  *  *
10150'
10160 REM  DESCRIPTION OF PROBLEM:
10170 REM  REMINDER:CHANGE NAME OF PROBLEM, USING 'RENAME'.
10180  
12000 LET $9 = $9 + 1
12010 
12020 IF $9 > 1 THEN 20000
12030 READ $7
13000 REM INITIALIZE STUDENT'S VARIABLES BY READING RECOGNIZABLE 
13010 REM WRONG NUMBERS.
13020 
14000 REM  INITIALIZE YOUR $-VARIABLES, ELSE THEY WILL BE 0.
14010 
15000 GO TO *
15010 
16000 REM TIME-LIMIT SET AT 1 SECOND. CHANGE IF DESIRED.
16010 TIME 1
16020  
20000 IF $9 > 2 THEN 30000
20010 READ $8
20020 IF $8 = 117 THEN 30000
20030 PRINT "YOU ARE READING THE WRONG AMOUNT OF DATA."
20040 REM  INSERT AN ADDITIONAL SENTENCE, IF DESIRED.
20050 STOP
20060  
30000 REM  READ A DUPLICATE SET OF DATA, TO BE USED IN
30010 REM  PRINTING ERROR-MESSAGES.
30020 REM  READ OR COMPUTE CORRECT ANSWERS.
30030 REM  CHECK STUDENT ANSWERS -- IF ERROR, THEN 40000.
30040 
39000 IF $9 <= $7 THEN *
39010 PRINT "CONGRATULATIONS. YOUR PROGRAM WORKS."
39020 REM  ADD AN ADDITIONAL USEFUL OR FUNNY SENTENCE.
39030 STOP
39040  
40000 IF $9 > 2 THEN 50000
40010 REM  CHECK WHETHER ANY OF THE INITIAL VALUES YOU SUPPLIED
40020 REM  ARE UNCHANGED. IF SO, STUDENT IS NOT USING THE
40030 REM  CORRECT VARIABLE(S).
40040 
41000 REM  CHECK WHETHER WRONG ANSWER IS RESULT OF YOUR
41010 REM  INITIAL VALUES. THEN HE IS NOT INITIALIZING.
41020  
50000 REM  DETAILED ERROR ANALYSIS. THIS IS THE PAY-OFF.
50010 REM  REMINDER: BE SURE THERE IS A 'STOP' AFTER EACH
50020 REM  ERROR MESSAGE YOU USE.
50030  
90000 REM  DATA: NO. OF TIMES YOU WANT TO GO THRU STUDENT PROGRAM.
90010 
91000 REM  DATA: FIRST SET OF DATA FOR STUDENT.
91010 
91980 DATA 117
91990 
92000 REM  DATA: DUPLICATE OF STUDENT DATA, OTHER DATA FOR
92010 REM        CHECKING FIRST STUDENT PASS.
92020 
93000 REM  DATA: DATA FOR LATER PASSES. ALWAYS HAVE
93010 REM        STUDENT DATA, THEN DUPLICATE, THEN OTHER DATA.
93020 
99999 END