Home » Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape03a_c16_basic2.wav » unit12quiz
unit12quiz
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape03a_c16_basic2.wav |
Filename: | unit12quiz |
Read OK: | ✔ |
File size: | 0DC4 bytes |
Load address: | 1001 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape03a_c16_basic2.wav » unit12quiz
- Personal collection » Commodore tapes » Commodore_16 » drawer_br_tape03b_c16_basic2.wav » unit12quiz
File contents
10 PRINT"<clr><cursor down><black> QUESTION AND ANSWER PROGRAM." 20 PRINT:PRINT" AT ALL TIMES, HIT ANY KEY TO" 25 COLOR0,2:COLOR4,15,4 30 PRINT" GET THE NEXT QUESTION" 40 PRINT:PRINT" ALWAYS FOLLOW YOUR REPLY 50 PRINT" WITH THE RETURN KEY" 60 PRINT:PRINT:PRINT" GOOD LUCK!" 70 FORJ=1TO12:READY$:NEXT 80 READN 90 DIMZ(N) 100 FORJ=1TON:Z(N)=0:NEXT 110 SC=0 120 FORJ=1TON 130 IFZ(J)>=0THEN 200 140 NEXTJ 150 FORJ=1TO2000:NEXTJ 155 PRINT"<black><clr><cursor down> YOU SCORED";SC 160 PRINT:PRINT" QUESTIONS RIGHT FIRST" 170 PRINT:PRINT" TIME OUT OF";N 180 PRINT:PRINT" THIS IS";INT(100*SC/N+0.5);"PERCENT" 190 END 200 D=1+INT(N*RND(1)) 210 IF Z(D)=-1THEN200 220 C=Z(D)+1 230 GOSUB1200 240 FORT=1TO3 250 GETA$:IFA$=""THEN250 260 GOSUB1000 270 GOSUB1300 280 GOSUB1600 285 IFR=1ANDT=1ANDZ(D)=0THEN SC=SC+1 290 IF R=1 AND T=1 THENZ(D)=-1:GOTO400 300 IF R=1 THEN 320 310 NEXTT 320 Z(D)=Z(D)+1:GOTO120 400 GOTO120 1000 PRINT"<clr>" 1010 PRINT"<clr>" 1020 FORJ=0TO39:POKE3072+J,160:POKE 2048+J,C:NEXT 1030 FORJ=0TO920STEP40:POKE3151+J,160:POKE 2127+J,C:NEXT 1040 FORJ=39TO0STEP-1:POKE4032+J,160:POKE 3008+J,C:NEXT 1050 FORJ=920TO0STEP-40:POKE3112+J,160:POKE 2088+J,C:NEXT 1055 W=2:IFLEN(X$)>110THENW=1 1060 P=1:J=3: K=3 1070 FOR QQ=1TO1000:A$=MID$(X$,P,1):P=P+1 1080 IFA$="#"THEN 1150 1090 IFA$="%"THENJ=J+W:K=3:GOTO1110 1095 IFA$="£"THEN A$=CHR$(34) 1100 POKE3072+40*J+K,ASC(A$)AND 63:POKE 2048+40*J+K,15:K=K+1 1110 NEXT QQ 1150 RETURN 1200 RESTORE 1215 FORJ=1TO12:READX$:NEXT 1220 READN 1230 FORJ=1TOD 1240 READX$:READY$ 1245 X$=X$+Y$:READY$ 1250 NEXT J 1260 RETURN 1300 PRINT"<home><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor right><cursor right><cursor right><flash on>▒<flash off><cursor left>"; 1305 A$="" 1307 GETQ$:IFQ$=""THEN 1307 1309 IFASC(Q$)<>20 THEN1314 1310 IFA$=""THEN1307 1311 PRINT"<cursor left><flash on>▒<flash off> <cursor left><cursor left>";:A$=LEFT$(A$,LEN(A$)-1):GOTO1307 1314 IFASC(Q$)=13 THEN PRINT" ";:GOTO1321 1315 IF Q$<"0" OR (Q$>"9" AND Q$<"A")OR Q$>"Z" THEN 1307 1316 PRINTQ$;"<flash on>▒<flash off><cursor left>"; 1317 A$=A$+Q$:GOTO1307 1321 P=LEN(A$):IF P=0THEN1300 1322 IFASC(RIGHT$(A$,1))<>32THEN1330 1323 A$=MID$(A$,1,P-1) 1326 GOTO1321 1330 IF LEFT$(Y$,1)<>"%"THEN1380 1340 P=2 1350 IFMID$(Y$,P,1)<>"-"THENP=P+1:GOTO1350 1360 IFVAL(A$)>=VAL(MID$(Y$,2,P-1))ANDVAL(A$)<=VAL(MID$(Y$,P+1,LEN(Y$))) THEN1500 1370 R=0:RETURN 1380 P=1 1390 IFMID$(Y$,P,1)="#"THEN1370 1400 Q=P 1410 IFMID$(Y$,Q,1)<>"%"THENQ=Q+1:GOTO1410 1420 IFMID$(Y$,P,Q-P)=A$THEN1500 1430 P=Q+1:GOTO1390 1500 :R=1:RETURN 1600 RESTORE 1620 S=6*(1-R)+INT(6*RND(1))+1 1630 FORJ=1TOS:READZ$:NEXT 1640 PRINT"<home><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor right><cursor right>";Z$ 1650 IFT<=2 THEN GOTO1750 1660 PRINT"<cursor right><cursor right>THE RIGHT ANSWER IS":PRINT"<cursor right><cursor right>"; 1670 IF LEFT$(Y$,1)="%"THEN1710 1680 P=1 1690 IFMID$(Y$,P,1)="%"THENGOTO1750 1700 PRINTMID$(Y$,P,1);:P=P+1:GOTO1690 1710 PRINTMID$(Y$,2,LEN(Y$)):GOTO1750 1750 PRINT"<home><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor down><cursor right> NOW TYPE ANY KEY":RETURN 2000 X$="ABCD" 2010 INPUTY$ 2020 IFX$=Y$THEN2050 2030 PRINT"NO":GOTO2000 2050 PRINT"YES" 2060 STOP 8010 DATAYES,CORRECT,RIGHT,GOOD,"THAT'S RIGHT",OK 8020 DATANO,WRONG,"THAT'S WRONG",NOT RIGHT,"NO-THAT'S WRONG",INCORRECT 9000 DATA 9 9010 DATA" CAN THE CONTROL VARIABLE IN%A £FOR£ COMMAND BE CALLED G$ ?%",# 9015 DATANO%N%# 9020 DATA" CAN THE FINAL VALUE OF THE%%CONTROL VARIABLE IN A £FOR£%%COMMAND BE 9025 DATA" A VARIABLE ITSELF?%%(E.G., AS IN £FOR FS = 1 TO GR£)%%#",YES%Y%# 9030 DATA" WHEN CAN YOU LEAVE OUT THE STEP%%SIZE FROM A £FOR£ COMMAND?%%A) NEVER" 9035 DATA"%B) WHEN THE STEP SIZE IS 1%C) WHEN THE STEP SIZE IS NOT% NEGATIVE%%#" 9037 DATA"B%# 9040 DATA"EXAMINE%%10 FOR Q=20 TO 37%20 PRINT Q*Q/5%30 NEXT W%% IS THIS%%A) CO 9045 DATA"RRECT BASIC%B) INCORRECT BASIC%C) AMBIGUOUS CODE%%#",INCORRECT%B%# 9050 DATA" HOW MANY COMMANDS CAN YOU PUT%%INTO THE BODY OF A £FOR£ LOOP?%%A) N 9055 DATA"ONE OR MORE%B) ONE OR MORE%C) EXACTLY ONE%%#",A%# 9060 DATA" CAN THE STARTING VALUE OF THE%%CONTROL VARIABLE IN A £FOR£%%COMMAND 9065 DATA" BE A VARIABLE ITSELF?%%(AS IN £FOR R = Q TO 100 STEP 4)%%#",YES%Y%# 9070 DATA" CAN THE STEP SIZE OF THE CONTROL%VARIABLE IN A £FOR£ COMMAND BE%A" 9075 DATA" VARIABLE ?%#","YES%Y%#" 9080 DATA"CONSIDER%%10 FOR Q=3 TO 15 STEP 4%20 PRINT Q%30 NEXT Q%%HOW MANY TIME" 9085 DATA"S OVER IS THE%BODY OF THE LOOP EXECUTED?%%#","FOUR%4%#" 9090 DATA"CONSIDER%%10 FOR R=7 TO 3%20 PRINT R%30 NEXT R%%HOW MANY TIMES IS THE 9095 DATA" BODY%OF THE LOOP OBEYED?%%A) ONCE%B) FIVE TIMES%C) NO TIMES%%#" 9097 DATA"ONCE%1%A%#"
- �"�� QUESTION AND ANSWER PROGRAM."