Quizmaster

Date: 198x
Type: Program
Platform(s): TS 2068
Tags: Education

Allows you to easily form your own Q&A tests.

Content

Appears On

Capital Area Timex Sinclair User Group’s Library Tape.

Related Products

Related Articles

Related Content

Image Gallery

Source Code

   10 REM INITIALIZATION         
   15 REM ****run 500
   20 LET s=0: LET x=m: LET b$="---------------": LET e$="                                "
   30 FOR n=1 TO m: LET y(n)=n: NEXT n
   40 GO SUB 400: CLS : FOR n=1 TO m: PRINT AT 10,8;a$(n): PAUSE 50: CLS : NEXT n
   50 REM MAIN PROGRAM           
   60 LET z=INT (RND*x+1): LET q=y(z)
   70 LET x=x-1
   80 FOR n=z TO x: LET y(n)=y(n+1): NEXT n
   90 CLS : LET t=2
  100 PRINT AT 3,0;c$(q): INPUT i$
  110 IF i$<>a$(q)( TO l(q)) THEN GO TO 240
  120 LET s=s+t: GO TO 210
  130 GO SUB 410: CLS 
  140 IF x=0 THEN GO TO 60
  150 REM FINAL SCORE            
  160 PRINT AT 5,0;"Your score was ";s;" out of ";m*2
  170 STOP 
  200 REM PRAISE                 
  210 PRINT AT 7,0;"Well done, ";i$;" was right.";AT 9,15;e$
  220 GO TO 130
  230 REM WRONG ANSWER           
  240 IF i$="" THEN GO TO 260
  245 PRINT AT 7,0;i$;" was wrong.";e$;AT 9,0;e$
  250 GO SUB 410
  260 IF t=2 THEN GO TO 310
  270 PRINT AT 7,0;"The right answer was:";e$;AT 9,15;a$(q)
  280 GO TO 130
  300 REM HINT/SECOND TRY        
  310 LET t=1
  320 PRINT AT 7,0;"Here is a hint:";e$;AT 21,0;e$
  330 PRINT AT 9,15;a$(q,1)+b$(1 TO l(q)-2)+a$(q,l(q))
  340 GO TO 100
  400 REM ENTER TO CONTINUE      
  410 PRINT AT 21,0;"Press ENTER to continue."
  420 GO SUB 460
  430 IF CODE k$=13 THEN RETURN 
  440 GO TO 420
  450 REM SINGLE KEY INPUT      
  460 IF INKEY$<>"" THEN GO TO 460
  470 IF INKEY$="" THEN GO TO 470
  480 LET k$=INKEY$: RETURN 
  500 REM ENTER QUESTIONS/ANSWERS
  510 PRINT "How many questions?": INPUT m
  520 DIM c$(m,64): DIM a$(m,15): DIM l(m): DIM y(m)
  530 FOR q=1 TO m
  540 CLS : PRINT "Question ";q''
  550 PRINT "Type in the question or clue.": INPUT c$(q)
  560 PRINT 'c$(q)''"Type in the answer.": INPUT i$
  570 PRINT 'i$;AT 20,0;"If satisfactory, type s.","  To delete, type d."
  580 GO SUB 460
  590 IF k$="d" THEN GO TO 540
  600 IF k$<>"s" THEN GO TO 580
  610 LET l(q)=LEN i$: LET a$(q)=i$
  620 NEXT q
  650 REM SAVE AND RUN           
  660 CLS : INPUT "What is the program name?";p$
  670 SAVE p$ LINE 20
 9997 STOP 
 9998 SAVE "QUIZMASTER" LINE 1

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

People

No people associated with this content.

Scroll to Top