C64S tape image file INTRO TO BASIC 2 UNIT16QUIZ "UNIT17PROG PICTURE BIGLETTERS 'UNIT20QUIZ l"UNIT21QUIZ  !.QUICKSORT )0LIFESTART 2WASPS &<MAKENAMES  " QUESTION AND"::" ANSWER PROGRAM."T:" AT ALL TIMES,"q(:" STRIKE ANY KEY TO"2:"GET THE NEXT QUESTION."3:" ALWAYS FOLLOW YOUR"4:" REPLY WITH THE"5:"  RETURN KEY!"<::" GOOD LUCK!"FJ112:Y$:PNZZ(N)3dJ1N:Z(N)0:<nSC0GxJ1NYZ(J)0 200`J}" YOU SCORED";SC:"QUESTIONS RIGHT FIRST":"OUT OF";N:"THIS IS";(100SCN0.5);"PERCENT"D1(N(1)) Z(D)1200C2Z(D)1200%T138A$:A$""250B1000L1300V1600sR1T1Z(D)0 SCSC1" R1 T1 Z(D)1:400, R1 3206T@Z(D)Z(D)1:120120""J021:7680J,160:38400J,C: .J044022:7723J,160:38443J,C:VJ2101:8164J,160:38884J,C:J440022:7702J,160:38422J,C:W2:(X$)100W1$P1:J3: K3.A$(X$,P,1):PP18A$"#" 1150BA$"%"JJW:K3:1070GA$"\"A$(34)3L768022JK,(A$) 63:3840022JK,0:KK1=V1070C~I[J112:X$:bNmJ1DyX$:Y$X$X$Y$:Y$ J"";P0:A$""G$:G$""1307R(G$)R20P0A$(A$,P1):PP1:" ";:1307V!(R64R91)(R47R58)(R32P0)PP1:A$A$G$:G$;:1307j#R13P01307%((A$,1))32A$(A$,P1):PP1:1315'2 (Y$,1)"%"1380<P2F(Y$,P,1)"-"PP1:1350P(A$)((Y$,2,P1))(A$)((Y$,P1,(Y$))) 1500!ZR0:)dP1An(Y$,P,1)"#"1370IxQPi(Y$,Q,1)"%"QQ1:1410(Y$,P,QP)A$1500PQ1:1390:R1:@TS6(1R)(6(1))1^J1S:Z$:h"";Z$rT2 1750$|"THE RIGHT ANSWER IS":"";; (Y$,1)"%"1710CP1\(Y$,P,1)"%"1750x(Y$,P,1);:PP1:1690(Y$,2,(Y$)):1750" NOW TYPE ANY KEY":JYES,CORRECT,RIGHT,GOOD,"THAT'S RIGHT",OK7TNO,WRONG,"THAT'S WRONG",NOT RIGHT,"NO-THAT'S WRONG",INCORRECT?(# 82#"DATA STATEMENTS%MUST COME%%A)BEFORE ANY%COMMANDS%%B)AFTER ALL THE%COMMANDS"7#"%%C)ANYWHERE IN THE%PROGRAM%%#",C%ANYWHERE%#<#"DATA STATEMENTS%MAY SHARE THEIR%LABEL NUMBERS WITH%CERTAIN COMMANDS.%%"9A#" TRUE%OR FALSE ?%#",F%FALSE%#F#"A DATA STATEMENT%MUST HAVE ALL ITS%ITEMS OF THE SAME%TYPE - THAT IS,%ALL STRI"K#"NGS OR%ALL NUMBERS.%% TRUE%%OR FALSE?%%#",F%FALSE%#!P#"A DATA STATEMENT%MAY HOLD ANY%NUMBER OF ITEMS%UP TO A MAXIMUM%TOTAL OF%88 CHARPU#"ACTERS.%% TRUE%OR FALSE?%#",T%TRUE%#Z#"A READ COMMAND MAY%REFER ONLY TO DATA%STATEMENTS WHICH%COME AFTER IT.%%"_#" TRUE%OR FALSE%%#",F%FALSE%#d#"A READ COMMAND%MUST USE UP%EXACTLY AS MANY%ITEMS AS THERE%ARE IN THE DATA%STA"Ki#"TEMENT.%% TRUE%OR FALSE%%#",F%FALSE%#n#"IF A READ COMMAND%TRIES TO PUT A%STRING INTO A%NUMBER VARIABLE,%THE ERROR IS%R"s#"EPORTED AT%%A) THE READ%COMMAND LABEL%%B) THE DATA%STATEMENT LABEL%%#",B%#Gx#"WHEN THE LAST DATA%STATEMENT HAS BEEN%USED UP, THE VIC%AUTOMATICALLY GOES%BAC"}#"K TO THE FIRST%ONE.%% TRUE%OR FALSE?%%#",F%FALSE%# DEBUG THIS PROGRAM!*"NAME";N$LN$"JIM"40:A$"JAMES":100p(N$"BOB" 50:A$"ROBERT":1002N$"KATE"60:A$"KATHERINE":100<N$"PENNY" 70:A$"PENELOPE":100F N$;" IS NOT"P"SHORT FOR ANYTHING."Z10 d"N$;" IS SHT"n"FOR ";A$ x10 DRAW A HOUSE""7X11 :Y18:N15:3000Q(X115:Y14:N15:4000k2X16:Y14:N110:1000<X11:Y19:N112:2000FX120:Y19:N112:2000PX11:Y121:N120:1000ZX11:Y19:N120:1000d X14 14 5n Y112 17 5 x 5000 Y1X1#200B POSITION CURSOR TO X1,Y1L"";] X10 540wKK1 X1:"";: KK Y10 &KK1 Y1:"";: KK0 TO DRAW HORIXONTAL LINE FOR N1 UNITS FROM X1,Y1 500R:POSITION CURSOR JJ1 N1" ";  JJ& "";,^ DRAW VERTICAL LINE N1 UNITS DOWN FROM X1,Y1z 500: POSITION CURSOR JJ1 N1" "; JJ DRAW LINE DIAGONALLY UPWARDS AND RIGHT FROM X1,Y1 500: POSITION CURSOR  KK1 N1 "";" KK( b DRAW LINE DIAGONALLY DOWNWARDS AND RIGHT FROM X1,Y1~ 500: POSITION CURSOR KK1 N1"ߒ"; KK DRAW WINDOW 500: POSITION CURSOR" ";6@ DISPLAY CHARACTER IN A1$ FOUR TIMES USUAL SIZEDJBB(A1$)_TBB13BB141"":q^BB18QQ1:hBB146QQ0:rBB32("",BB1,1);:|BB144 BB160("",BB143,1);:)AA(BB31)0.5(BB128):(BB64)0AAAA32;JJ0 6 2gKK(327688AAJJ):LL(327698AAJJ)yNN64:MM03PP18(KKNN)2(LLNN)KKKK(KKNN)NN:LLLL(LLNN)NNQQ0("  ",PP,2);:8150.("  ",PP,2);BNN(NN4): MMP"";XJJi"";(211)18""  " QUESTION AND"::" ANSWER PROGRAM."T:" AT ALL TIMES,"q(:" STRIKE ANY KEY TO"2:"GET THE NEXT QUESTION."3:" ALWAYS FOLLOW YOUR"4:" REPLY WITH THE"5:"  RETURN KEY!"<::" GOOD LUCK!"FJ112:Y$:PNZZ(N)3dJ1N:Z(N)0:<nSC0GxJ1NYZ(J)0 200`J}" YOU SCORED";SC:"QUESTIONS RIGHT FIRST":"OUT OF";N:"THIS IS";(100SCN0.5);"PERCENT"D1(N(1)) Z(D)1200C2Z(D)1200%T138A$:A$""250B1000L1300V1600sR1T1Z(D)0 SCSC1" R1 T1 Z(D)1:400, R1 3206T@Z(D)Z(D)1:120120""J021:7680J,160:38400J,C: .J044022:7723J,160:38443J,C:VJ2101:8164J,160:38884J,C:J440022:7702J,160:38422J,C:W2:(X$)100W1$P1:J3: K3.A$(X$,P,1):PP18A$"#" 1150BA$"%"JJW:K3:1070GA$"\"A$(34)3L768022JK,(A$) 63:3840022JK,0:KK1=V1070C~I[J112:X$:bNmJ1DyX$:Y$X$X$Y$:Y$ J"";P0:A$""G$:G$""1307R(G$)R20P0A$(A$,P1):PP1:" ";:1307V!(R64R91)(R47R58)(R32P0)PP1:A$A$G$:G$;:1307j#R13P01307%((A$,1))32A$(A$,P1):PP1:1315'2 (Y$,1)"%"1380<P2F(Y$,P,1)"-"PP1:1350P(A$)((Y$,2,P1))(A$)((Y$,P1,(Y$))) 1500!ZR0:)dP1An(Y$,P,1)"#"1370IxQPi(Y$,Q,1)"%"QQ1:1410(Y$,P,QP)A$1500PQ1:1390:R1:@TS6(1R)(6(1))1^J1S:Z$:h"";Z$rT2 1750$|"THE RIGHT ANSWER IS":"";; (Y$,1)"%"1710CP1\(Y$,P,1)"%"1750x(Y$,P,1);:PP1:1690(Y$,2,(Y$)):1750" NOW TYPE ANY KEY":JYES,CORRECT,RIGHT,GOOD,"THAT'S RIGHT",OK7TNO,WRONG,"THAT'S WRONG",NOT RIGHT,"NO-THAT'S WRONG",INCORRECT>(#8<#"THE SUBSCRIPT OF%AN ARRAY ELEMENT%IS CALCULATED%%A)WHEN THE ARRAY%IS DECLARED"A#"%%B)WHEN THE PROGRAM%IS TYPED IN%%C)WHEN THE ARRAY%ELEMENT IS USED%#",C%#8F#"CONSIDER% DIM U(K)%THIS IS%%A) ALWAYS WRONG%B) CORRECT IF THE%VALUE OF K IS "K#"SET%BEFORE THE DECLA-%RATION%C) CORRECT IF THE%VALUE OF K IS SET%ANYWHERE#",B%#P#"CAN YOU HAVE A%VARIABLE CALLED Q%AND AN ARRAY%CALLED Q IN THE%SAME PROGRAM?%"U#" YES% NO%#",Y%YES%#QZ#"CAN YOU HAVE%DIFFERENT ARRAYS%CALLED P AND P$ IN%THE SAME PROGRAM?%% YES%"i_#" NO%%#",Y%YES%#d#"WHAT HAPPENS IF%YOU DECLARE AN%ARRAY TWICE?%%A)THE SECOND DEC-%LARATION%IS IG"i#"NORED%%B)THE VIC SETS UP%AN ARRAY TWICE THE% SIZE%%C)A FAULT OCCURS%#",C%#dn#"CONSIDER%% DIM P(17)%%THE ARRAY P HAS%%A) 17 ELEMENTS%B) 18 ELEMENTS%C) SOME "s#"OTHER%NUMBER OF ELEMENTS%%#",B%18%#x#"CONSIDER% DIM G$(7)%THE ELEMENTS OF%THIS ARRAY ARE%A) NUMBERS%B) STRINGS}#"%%#",B%STRINGS%#M#"ARRAYS MAY HAVE%ELEMENTS WHICH ARE%%A)ALL NUMBERS OR% ALL STRINGS.%B)NUMBERS"#" AND% STRINGS MIXED%C)NUMBERS ONLY%D)STRINGS ONLY%%#",A%# " QUESTION AND"::" ANSWER PROGRAM."T:" AT ALL TIMES,"q(:" STRIKE ANY KEY TO"2:"GET THE NEXT QUESTION."3:" ALWAYS FOLLOW YOUR"4:" REPLY WITH THE"5:"  RETURN KEY!"<::" GOOD LUCK!"FJ112:Y$:PNZZ(N)3dJ1N:Z(N)0:<nSC0GxJ1NYZ(J)0 200`J}" YOU SCORED";SC:"QUESTIONS RIGHT FIRST":"OUT OF";N:"THIS IS";(100SCN0.5);"PERCENT"D1(N(1)) Z(D)1200C2Z(D)1200%T138A$:A$""250B1000L1300V1600sR1T1Z(D)0 SCSC1" R1 T1 Z(D)1:400, R1 3206T@Z(D)Z(D)1:120120""J021:7680J,160:38400J,C: .J044022:7723J,160:38443J,C:VJ2101:8164J,160:38884J,C:J440022:7702J,160:38422J,C:W2:(X$)100W1$P1:J3: K3.A$(X$,P,1):PP18A$"#" 1150BA$"%"JJW:K3:1070GA$"\"A$(34)3L768022JK,(A$) 63:3840022JK,0:KK1=V1070C~I[J112:X$:bNmJ1DyX$:Y$X$X$Y$:Y$ J"";P0:A$""G$:G$""1307R(G$)R20P0A$(A$,P1):PP1:" ";:1307V!(R64R91)(R47R58)(R32P0)PP1:A$A$G$:G$;:1307j#R13P01307%((A$,1))32A$(A$,P1):PP1:1315'2 (Y$,1)"%"1380<P2F(Y$,P,1)"-"PP1:1350P(A$)((Y$,2,P1))(A$)((Y$,P1,(Y$))) 1500!ZR0:)dP1An(Y$,P,1)"#"1370IxQPi(Y$,Q,1)"%"QQ1:1410(Y$,P,QP)A$1500PQ1:1390:R1:@TS6(1R)(6(1))1^J1S:Z$:h"";Z$rT2 1750$|"THE RIGHT ANSWER IS":"";; (Y$,1)"%"1710CP1\(Y$,P,1)"%"1750x(Y$,P,1);:PP1:1690(Y$,2,(Y$)):1750" NOW TYPE ANY KEY":JYES,CORRECT,RIGHT,GOOD,"THAT'S RIGHT",OK7TNO,WRONG,"THAT'S WRONG",NOT RIGHT,"NO-THAT'S WRONG",INCORRECT>(#7d<#"IS THIS CORRECT?%%MID$(X$,5,1)"A#="U"% YES% NO%#,NO%N%#F#WHAT IS DISPLAYED?%%X$=STR$(3*4)%PRINT X$+"1"%%A) 13%B) 3*4+1% K#C) 121%D) SOMETHING ELSE%%#,C%121%#WP#WHAT IS DISPLAYED?%%X=VAL("22"+"33")%PRINT X+1%%A) 2234%B) 56%U#C) "2233+1"%D) SOMETHING ELSE%%#,A%2234%#Z#CONSIDER THE%EXPRESSION%%Q-INT(Q/P)*P%%IS IT EQUAL TO%ZERO WHEN%A) P DIVIDES Q%(_#EXACTLY%B) P DOES NOT%DIVIDE Q EXACTLY%C) P IS GREATER%THAN Q%#,A%#Gd#PRINT RIGHT$(%"COMMODORE"mi#",3)%%WHAT IS PRINTED?%%#",ORE%#n#CONSIDER%Y$="BALLET"%X$=LEFT$(Y$s#",4)%PRINT X$%%WHAT IS DISPLAYED?%##",BALL%#x#CONSIDER%Y$=MID$("DATE"}#"% ,2,3)%PRINT Y$%%WHAT IS PRINTED?%%#",ATE%#K#CONSIDER%XY$="ABCD"%X=LEN(XY$+"XY$")%PRINT X%%j#WHAT IS DISPLAYED?%%#,7%#)p QUICKSORT:SORTS N1 ELEMENTS 0F A18zSS16030[SS%(100):SS1: DECLARE STACKxAA1:BBN1:SS%(0)1:PP1XXAA:YYBB:ZZA1(BB)XXYY6090A1(XX)ZZXXXX1:6050A1(YY)ZZYYYY1:6050 DDA1(YY):A1(YY)A1(XX):A1(XX)DD:6050'A1(BB)A1(XX):A1(XX)ZZ:XXAA16140jSS%(PP)XX:SS%(PP1)BB:SS%(PP2)2:PPPP3|BBXX1:6040PPPP3:XXSS%(PP):BBSS%(PP1)BBXX16170SS%(PP)3:PPPP1:AAXX1:6040PPPP1SS%(PP1)6180,6130,6160$" FIRST PART OF LIFE PROGRAM7X$(9,9),Y$(9,9)U"TYPE STARTING PATTERN"o("IN *'S AND SPACES,"2"USING CURSOR CONTROLS"<"TO GET IT INSIDE THE"F"BOX."P" "ZJ1 9d" "nJ x" """;( J1 97T$"": T$DK2 10\X$(J,K1)(T$,K,1)eK,J DISPLAY CURREN POSITION" "J1 9" ";K19:X$(J,K);:K""J" "3 WASPSHOOTER COPYRIGHT (C) ANDREW COLIN 1981V"W A S P S H O O T E R"::p"KILL ALL THE WASPS"("BEFORE THE FLY-SPRAY"2"RUNS OUT"<:" M TO TURN RIGHT"F" B TO TURN LEFT"P" F TO GO FORWARD"Z" S TO SHOOT":7dPA36875:PB36876:PC36877:PD36878:PE36879:SR7680NnPB,0:PC,0:PD,15fx"HOW MANY WASPS";NN1N20 "1 TO 20 PLEASE":120V%(8),U%(8),D%(8,2),W%(N,2)J18V%(J),U%(J),D%(J,1),D%(J,2)J-22,93,0,-1,-21,78,1,-11,67,1,0,23,77,1,1/22,93,0,1,21,78,-1,1L-1,67,-1,0,-23,77,-1,-1bBU(7(N)):SQ0k""J0505:38400J,0:JJ1NW%(J,1)(22(0))W%(J,2)(12(0))1 SR22W%(J,2)W%(J,1),35"J,NAN6TSTI@A3:B18:C2:2000JNA0500-OBU0600OT" "u^"WASPS";NA;"TIME";((TITS)60)h"SHOTS ";BU;" "rJ11NA|W%(J1,1)01000A$:A$""4103000J12000:330 WINS" WELL DONE !":4" YOU HAVE KILLED ";NNA:]"WASPS IN"((TITS)60);"SECONDS":u"YOU WERE STUNG":&SQ;"TIMES"0PD,0:PC,0:PB,0:PA,0:X OUT OF FLY-SPRAYb"SORRY-NO FLY-SPRAY":l"LEFT!":v520 MOVE J1'TH WASP AT RANDOM1XXW%(J1,1):YYW%(J1,2)\XNXX(3(0))1:XN0 XN21 1020YNYY(3(0))1: YN1 YN22 1030 SR22YYXX,32ZZSR22YNXN:(ZZ)32 ZZ,35$W%(J1,1)XN:W%(J1,2)YN .IPIP(3(0))1: IP180IP205 IP192$8XNA YNB40001BPA,IP:F DISPLAY HUNTERcXXSR22BA:YYXXV%(C)zXX,81:YY,U%(C): ERASE HUNTER XXSR22BA:YYXXV%(C) XX,32:YY,32: MOVE HUNTER OR SHHOT A$"M"3040 2500:CC1:C9C1 2000:" A$"B" 3070; 2500:CC1:C0C8G 2000:Z A$"F" 3150~ 2500:AAAD%(C,1):BBBD%(C,2) AA2 AA19 BB2 BB19 AAA:BBB 2000& JJ1NA0 AW%(JJ,1)BW%(JJ,2)4000: JJD N A$"S" $X PPA2D%(C,1):QQB2D%(C,2)0b PC,252<l BUBU1Ov RRSR22QQPP[ KK15t RR,102:TT130:TT RR,32:TT150:TT KK PC,0 JJ1NA PPW%(JJ,1) QQW%(JJ,2)J2JJ:5000 JJ: HUNTER IS STUNG" S T U N G !!!"2500JA(316(0)):B(316(0)):C(18(0))cPD,15:2000:SQSQ1JJ120:PB,240JJ:PE,250JJTT150:TTJJPB,0:PE,27: WASP IS KILLED"A WASP BITES THE DUST!"PD,15: PE,123JJ120:PB,255JJ#TT110:TT:PB,0:TT140:TTIJJ:PE,27^J2NANANA1:vW%(J2,1)W%(J21,1)W%(J2,2)W%(J21,2)J2J21:5070V MILDRED,UNITY,ADELHEID,DESIREE,MERLE,XENOBIA,ANTHEA,TIZIANA,FLORENCE,ANNE,ALICE` KATEFIONA,ESTHER,DEIRDRE,SARAH,GILLIAN,MARGARET,CHRISTINE,ALISON,ALICE,CATHERINE BURL,MUSTAPHA,CLOPPER,RANDY,FRED,JUSTUS,ISRAEL,HARDY,IRVING,DOUGLAS,ELGIN,MONETEEJ(OSWALD,MICHAEL,STEPHEN,TIM,TOM,HARRY,IAN,FRANK,PETER,STUART-NOGGLE,LOKEN,SCHUYLER,NIGGLI,STRUNK,STACK,MBOOB,ALMON,REDSLOB,POPP,TUITS,SWEENEY.FAINSODD,HADDOCK,PLOG,FATT,GROSECLOSE,NAUSEA,JEEP,MCDOOM,SOZZI,MOOG,SMUT,WORMD2ANDERSON,ATTWELL,BLOGGS,COLLINS,CHALMERS,DEWAR,EISENSTEIN,ENTWISTLE,CLANGER<FLOOD,GAMP,GROPER,GORDON,HEWITT,HANKEY,ILINGWORTH,INCE,JONES,KNIGHT,HENDERSONFMACDONALD,MACGREGOR,MCNAB,MCFEE,MCGEORGE,MACTAVISH,MAXWELL,MACE,MUNRO,MORE1PSMITH,THOMSON,WILSON,SHAW,OGILVIE,PETERSON,RATTRAY,RAMSAY,YUILL,ZELLZWORMWOOD SCRUBBS,PENTONVILLE,BRIXTON,HOLLOWAY,READING,STRANGEWAYS,DARTMOORdBROADMOOR,CARSTAIRS,PETERHEAD,BARLINNIE,LANCASTERn"RD.","ST.","AVE.","GDNS.","SQ.","PL.","CLOSE","RD.","ST.","ST."%xEDINBURGH,GLASGOW,DUNDEE,ABERDEENxFOOTBALL,TENNIS,HILLWALKING,OPERA,JAZZ,ROCK,THEATRE,READING,POLITICS,STUDYINGCHESS,GAMBLING,HORSERACING,CARS,MOTORBIKES,CYCLING,MEETING PEOPLECONSERVATIVE,LIBERAL,LABOUR,SDP,OTHER,NONE,G$(22),B$(22),S$(64),P$(12),R$(10),T$(4 ),H$(17),PO$(6)BJ122:G$(J):JXJ122:B$(J):JnJ164:S$(J):JJ112:P$(J):JJ110:R$(J):JJ14:T$(J):J J117:H$(J):JJ16 :PO$(J):J1,1,2,"COMPUTER DATES",Q1100!6S$"M":C$B$(122(0))G@(0)0.5S$"F":C$G$(122(0))cJC$C$" "S$(140(0))^A$((1(0)99))" "P$(112(0))" "R$(1(0)10)cT$T$(1(0) 4)hA17((0)10)rH64:S$"M"H67|1000:HH2.5RH(H0.5)H1$H$(117(0)),H2$H$(117(0))>H2$H1$ 410SP$PO$(16(0))X$C$","A$","T$","S$","(A)","(H)","H1$","H2$","P$(X$)783101,X$X$Q1 R=N.D.VARR0JJ112:RR(0):JJRR6:$1000:R:2000