C64S tape image fileBASIC BASIC §ÀLESSON #6-1 ºgLESSON #6-2 £!LESSON #7-1 ›Ä%LESSON #7-2 µ_1LESSON #8-1 Ø=LESSON #8-2 ÄìHLESSON #9-1 ±°TLESSON #9-2 na`LESSON #9-3 ¾ÏjANIMATION kDEPRECIATION X•mADDRESS LIST ëíqMEAN & STANDARD äØuRANKING ¼yWORD GAME +Q$²"‘ ‘‘‘":Z$²Ç(34):‰12\™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";yI²1¤38:™""C$"";:‚:™C$”I²1¤23:™"‘"C$"";:‚:Ž¥¡A$:‹A$²""§7­™:Žñ C$²"Ø":3:™""£15)"LESSON 6":™£12)"1. HOMEWORK EXPLAINED(™£12)"2. READÎDATA STATEMENTS":™£12)"3. ARRAYS":7K™"“"£11)"HOMEWORK EXPLAINED":™x™"HERE IS A PROGRAM WHICH WILL PRINT OUT¢™"AN EMPLOYEES SALARY:":™"2 INPUT Hî™"6 IF H>40 THEN 12":™"8 PRINT "Z$"SALARY IS "Z$"6.25*H":™"10 GOTO 16?™"12 LET S=6.25*40+(H-40)*6.25*1.5":™"14 PRINT "Z$"SALARY IS "Z$"S":™"16 END‰™"IF YOU WERE NOT ABLE TO WRITE SUCH":™"A PROGRAM, YOU SHOULD REVIEW™"LESSON 5.":7Ý ™"“"£15)"READÎDATA":™"WE HAVE SEEN TWO METHODS OF ENTERING"™"DATA INTO THE COMPUTER:":™:™"1. THE INPUT STATEMENT4$™"2. THE LET STATEMENT}&™"THE FOLLOWING ILLUSTRATES A THIRD":™"METHOD:":7:™"“ 2 READ A$,H¸(™" 4 PRINT A$,H":™" 6 READ B$,R":™" 8 PRINT B$,Rü*™" 10 DATA "Z$"HOURS"Z$", 40, "Z$"RATE"Z$:™" 12 DATA 4.75":7B,™"DATA FOR THE VARIABLES LISTED IN THE":™"READ STATEMENTS":Y²1:7j.900:910:Y²3:900:910:7:Y²9:900«0™£16)"COME FROM VALUES STORED":™"IN THE DATA STATEMENTS.":7Î2Y²5:900:910:Y²6:900:910:7 4Y²12:900:™"IN THIS EXAMPLE, THE STRING "Z$"HOURS"Z$6 6™"WILL BE STORED IN THE VARIABLE A$’,":™d 8™"THE NUMBER 40’ WILL BE STORED IN H’,­ :™"THE STRING "Z$"RATE"Z$"’ WILL BE STORED":™"IN THE VARIABLE B$’,ö <™"AND 4.75’ WILL BE STORED IN R’.":™"MORE THAN ONE DATA STATEMENT8 >™"MAY BE USED TO SUPPLY THE NEEDED VALUES":7:Y1²8:Y2²24:920† B™"THE MAIN ADVANTAGE OF USING THE":™"READÎDATA STATEMENTS RATHER THAN THEÑ D™"INPUT STATEMENT IS THAT DATA IS":™"PERMANENTLY STORED ALONG WITH THEä F™"PROGRAM.":7+ H™"“WHICH OF THE FOLLOWING IS AN":™"ACCEPTABLE USE OF THE READÎDATAi J™"STATEMENTS:":™"1.’ 15 READ X,Y,Z":™" 18 DATA 10,20¹ L™"2.’ 11 READ M":™" 20 DATA "Z$"YES"Z$:™"3.’ 16 READ P":™" 18 READ Nø N™" 20 DATA 16, 29.7":…"(1, 2 OR 3)";A$:‘Å(A$)‰84,94,102 P™Q$:‰78> T™"NO, THERE MUST BE AT LEAST AS MANY":™"VALUES IN ";r V™"THE DATA STATEMENT":7:Y²6:900:™£2);:910:7± XY²19:900:™"AS THERE ARE VARIABLES LISTED IN THE":™"READ";è Z™" STATEMENT.":7:Y²5:900:™£2);:910:7:Y²22:900 \™"TRY AGAIN!":7:‰72, ^™"NO, THE VALUE IN THE DATA STATEMENTU _7:Y²9:900:™"";:910:7:Y²18:900ž `™"IS A STRING, WHILE THE VARIABLE M IN":™"THE READ STATEMENT":7:Y²8Ç b900:™"";:910:7:Y²19:900:™£19);ü d™"IS A NUMERIC VARIABLE":7:™"TRY AGAIN!":7:‰72Kf™"CORRECT":™"IN 1’ TOO LITTLE DATA":™"IN 2’ M IS NUMERIC BUT DATA IS";[g™" A STRING‘Ò7:C$²"Ø":3:™"END OF LESSON 6 PART 1ÅÔV$²"":™"";:‹¸(0)±999§930à×™"PRESS SHIFT-RUN"V$:€„™"":I²0¤Y«1:™"";:‚:™"‘‘";:ŽŽJ²1¤15:™">";:I²1¤40:‚@“™">’";:K²1¤25:‚:‚:™" ":Ž†˜Y²Y1:900:I²0¤Y2«Y1:™" ":‚‘š900:Ž¤¢™"LOADING"V$:“Z$²Ç(34):‰108D™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";aI²1¤38:™""C$"";:‚:™C$|I²1¤23:™"‘"C$"";:‚:Ž¡A$:‹A$²""§7•™:ŽÊl™"“"£17)"ARRAYS":™"IN ADDITION TO THE VARIABLESn™"DESCRIBED PREVIOUSLY, BASIC ALLOWS THE":™"USE OF SUBSCRIPTED VARIABLES’.Fp™"SUBSCRIPTED VARIABLES ARE OFTEN USEDr™"WHEN DEALING WITH LISTS, TABLES OR ANY":™"SET OF RELATED VARIABLES.Út™"ON YOUR PET YOU MAY USE EITHER":™"ONE, TWO OR MORE SUBSCRIPTS.":7v™"“HERE ARE SOME EXAMPLES OF SUBSCRIPTED":™"VARIABLES:Zx™" A(6)":™" R$(4)":™" R1(21,33)":™" FF$(K)":™" U$(R,C)ly™" M(2*I+3)·z™"THE NAME OF A SUBSCRIPTED VARIABLE":™"IS ANY VARIABLE NAME FOLLOWEDã|™"BY ONE OR MORE EXPRESSIONS -SEPARATED~™"BY COMMAS- ENCLOSED IN PARENTHESES.":7=Œ™"“THE NAME OF THE SUBSCRIPTED VARIABLEyŽ™"MAY BE THOUGHT OF AS THE NAME OF A":™"LIST OR TABLE.Ê™"THE EXPRESSION INSIDE THE PARENTHESES":™"INDICATES THE POSITION OF DATA IN’™"THE LIST OR TABLE.":™"FOR EXAMPLE A SINGLE SUBSCRIPTEDO”™"VARIABLE MAY BE VIEWED GRAPHICALLY AS":™"A LIST AS SHOWN BELOW:”–™" Ï£££££Ï£££££Ï£££££Ï££££Ð":™" ¥C(0) ¥C(1) ¥C(2) ¥C(3)§¹˜™" ̤¤¤¤¤Ì¤¤¤¤¤Ì¤¤¤¤¤Ì¤¤¤¤º š™"THE SUBSCRIPT REFERS TO THE DATA":™"STORAGE LOCATION WITHIN THE LIST.J œ™"THUS C(2) REFERS TO THE POSITION IN":™"THE LIST AS SHOWN.":7ˆ žY²14:900:™£18):I²1¤20:™"C(2)’";:J²1¤40:‚:™"C(2)";• Ÿ™"";¨  K²1¤50:‚:‚:7Ý ¢Y²23:900:™"NOTE THAT THE FIRST POSITION IN THE"& ¤™"LIST IS SUBSCRIPTED 0.":7:™"“A DOUBLE SUBSCRIPTED VARIABLE MAY BER ¦™"BE VIEWED AS A TABLE AS SHOWN BELOW:{ ¨™" Ï£££££££Ï£££££££Ï£££££££Ï££££££Ð¤ ª™" ¥C(0,0) ¥C(0,1) ¥C(0,2) ¥C(0,3)§Í ¬™" ̤¤¤¤¤¤¤Ì¤¤¤¤¤¤¤Ì¤¤¤¤¤¤¤Ì¤¤¤¤¤¤ºö ­™" Ï£££££££Ï£££££££Ï£££££££Ï££££££Ð ®™" ¥C(1,0) ¥C(1,1) ¥C(1,2) ¥C(1,3)§H °™" ̤¤¤¤¤¤¤Ì¤¤¤¤¤¤¤Ì¤¤¤¤¤¤¤Ì¤¤¤¤¤¤ºq ±™" Ï£££££££Ï£££££££Ï£££££££Ï££££££Ðš ²™" ¥C(2,0) ¥C(2,1) ¥C(2,2) ¥C(2,2)§Ã ³™" ̤¤¤¤¤¤¤Ì¤¤¤¤¤¤¤Ì¤¤¤¤¤¤¤Ì¤¤¤¤¤¤º ´™"THE SUBSCRIPT AGAIN REFERS TO THE":™"DATA STORAGE LOCATION WITHIN; ¶™"THE TABLE.":™"THUS C(1,3) REFERS TO THEe ¸™"POSITION IN THE TABLE AS SHOWN.":7 ºY²8:900:™£27):I²1¤20:™"C(1,3)’";:J²1¤40:‚Á ¼™"C(1,3)";:J²1¤50:‚:‚:7 ¾™"“"£12)"DIM STATEMENT":™"WE USE THE DIM (SHORT FOR DIMENSION’)M À™"STATEMENT TO SPECIFY THE MAXIMUM SIZE":™"OF THE LIST OR TABLE.| ™"FOR EXAMPLE:":™"30 DIM A(20), C$(15,3)Ÿ Ä™"CREATES A LIST- LABELED A’-Ê Æ™"HAVING 21 ENTRIES (SUBSCRIPTS 0-20)ø È™"AND ALSO CREATES A TABLE- LABELED C$’--Ê™"HAVING 16 ROWS AND 4 COLUMNS.":™"REMEMBER: ";vÌ™"0’ IS THE FIRST SUBSCRIPT.":™"THE DIM STATEMENT IS NOT NEEDED IF±Ι"THE SUBSCRIPT OR SUBSCRIPTS DO NOT":™"EXCEED 10.":7ÛÒC$²"Ø":3:™""£12)"END OF LESSON 6üÔ™""£12)"LOAD LESSON#7-1Ö™"":€4„™"":I²0¤Y«1:™"";:‚:™"‘‘";:ŽfŽJ²1¤20:™">";:I²1¤50:‚:™" ";:K²1¤50:‚:‚:Ž¬˜Y²Y1:900:I²0¤Y2«Y1:™" ":‚·š900:Ž%Q$²"‘ ‘‘‘":‰16V™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";sI²1¤38:™""C$"";:‚:™C$ŽI²1¤23:™"‘"C$"";:‚:ŽŸ¡A$:‹A$²""§7§™:ŽÊ ™"":I²0¤Y«1:™"";:‚:™"‘‘";:Ž J²1¤15:™">";:I²1¤40:‚:™">’";:K²1¤20:‚:‚:™" ":ŽG Y²Y1:9:I²0¤Y2«Y1:™" ":‚P9:Ž’Z$²Ç(34):C$²"¦":3:™""£13)"LESSON 7":™£10)"1. LOOPINGË™£10)"2. FORÎNEXT STATEMENTS":™£10)"3. REM STATEMENT홣10)"4. HOMEWORK PROBLEM":7,™"“"£17)"LOOPING":™"A POWERFUL FEATURE OF ANY COMPUTER ISy™"ITS ABILITY TO PERFORM REPETITIVE TASKS":™"ON DATA QUICKLY AND EASILY.€7Ð"™"“A PROGRAM TO CALCULATE SEVERAL":™"EMPLOYEES SALARIES WILL ILLUSTRATE THE$™"USE OF LOOPS:":™" 95 READ N$,R,H":™" 100 IF N$="Z$"END"Z$" THEN 755b&™"110 PRINT "Z$"SALARY FOR "Z$"N$"Z$" IS "Z$"R*H":™" 115 GOTO 95´(™" 120 DATA "Z$"BOB SMITH"Z$", 3.50, 40":™" 125 DATA "Z$"AL LEE"Z$", 3.75, 20â*™" 130 DATA "Z$"JANET JONES"Z$", 4.00, 38,,™" 140 DATA "Z$"JOHN DOE"Z$", 4.10, 40":™" 199 DATA "Z$"END"Z$", 0, 0i.™" 755 END":7:™"THIS PROGRAM WILL REPEAT THE STATEMENTSš0™"95 THROUGH 115":7:Y²5¤8:9:11:‚:Y²17:9ä2™£15)"UNTIL THE END’ AND":™"THE 0’ VALUES IN LINE 199 ARE READ.":7$ 4Y²13:9:11:7:Y²20:9:™"THE LOOPING IS ACCOMPLISHED BY THEZ 6™"GOTO’ STATEMENT IN LINE 115.":7:Y²8:9:11:7v 7Y1²16:Y2²22:13:Y²16:9Ä 8™"THE IF STATEMENT IN LINE 100 WILL":™"TERMINATE THE LOOP WHEN THE STRINGó :™"END’ IS READ.":7:Y²6:9:11:7:Y²20:9B <™"THE REAL VALUE OF LOOPING IN THIS":™"PROGRAM BECOMES APPARENT WHEN THEREm >™"ARE MANY EMPLOYEES.":7:Y2²24:13:9½ @™"THE ONLY CHANGE NECESSARY TO THE":™"PROGRAM WHEN ADDING MORE EMPLOYEES ISã B™"THE ADDITION OF DATA STATEMENTS( D™"(ONE FOR EACH EMPLOYEE).":7:™"IT IS UNNECESSARY TO CHANGE THEg F™"LOGIC OF THE PROGRAM IF ANY ADDITIONS":™"ARE MADE.‘";:7‡ H13:9:™"QUIZ TIME!":7:C²0Ë J™"HOW MANY TIMES WILL THE COMPUTER":™"EXECUTE STATEMENT 95":Y²5ó K9:11:Y²19:9:™"(1, 4 OR 5)";:…A$ L‹A$³±"1"¯A$³±"4"¯A$³±"5"§™Q$:‰747 M13:Y²16:9:‹A$²"5"¯C²0§98K N‹A$²"5"¯C²1§100[ O‹A$²"5"§104j P‹A$²"4"§92¼ RC²Cª1:™"REMEMBER THAT THE GOTO STATEMENT":™"TRANSFERS CONTROL BACK TO LINE 95ç T7:™"WHEN CONTROL IS THUS TRANSFERRED,4 V™"LINE 95 WILL BE EXECUTED AGAIN.":7:™"THE IF STATEMENT WILL BREAK THISr X™"LOOP WHEN END’ IN LINE 199 IS READ":Y²13:9:11:7:13Ÿ ZY²16:9:™"TRY AGAIN!":7:13:Y²18:9:‰74ë \™"NO, 4 TIMES IS NOT CORRECT.":™"NOTE THAT LINE 95 IS EXECUTED ONCE FOR4^™"EACH DATA STATEMENT, INCLUDING LINE 199":7:™"TRY AGAIN!":C²Cª1:7H`13:Y²18:9:‰74kb™"CORRECT FIRST TRY!!":7:‰106˜d™"CORRECT SECOND TRY - NOT BAD!":7:‰106¬h™"THAT'S RIGHT,ûj™"THE READ STATEMENT IS EXECUTED 5 TIMES,":™"ONCE FOR EACH DATA STATEMENT.2Ò7:C$²" ":3:™"END OF LESSON 7 PART 1eÔV$²"":™"";:‹¸(0)±999§214€Õ™"PRESS SHIFT-RUN"V$:€ Ö™"LOADING, PLEASE WAIT"V$:“1Z$²Ç(34):‰110:C.77JAMES&LODEWYCK2096348888b™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";I²1¤38:™""C$"";:‚:™C$šI²1¤23:™"‘"C$"";:‚:Ž«¡A$:‹A$²""§7³™:ŽÖ ™"":I²0¤Y«1:™"";:‚:™"‘‘";:Ž J²1¤15:™">";:I²1¤40:‚:™">’";:K²1¤20:‚:‚:™" ":ŽS Y²Y1:9:I²0¤Y2«Y1:™" ":‚\9:Žn™"“"£10)"FORÎNEXT STATEMENTS":7Ëp™"LOOPING MAY ALSO BE ACHEIVED BY USING":™"THE FORÎNEXT’ STATEMENTS.r7:™"THESE ARE USEFUL IN LOOPS THAT ARE":™"CONTROLLED BY COUNTING.@t7:™"THE FOLLOWING PROGRAM WILL READ IN Av™"LIST OF NUMBERS AND PRINT THEM OUT:":7:™" 2 FOR I=1 TO 10²x™" 4 READ A(I)":™" 6 PRINT A(I)":™" 8 NEXT Iÿz™" 9 DATA 3.1,1.4,8,9.4,2,5,7,8.6,3,14.7":7:™"THE FOR’ STATEMENT":Y²12.|9:11:7:Y²18:9:™£18)"CALLS FOR REPEATEDy~™"EXECUTION OF ALL STATEMENTS DOWN TO":™"THE NEXT’ STATEMENT":Y²15:9ƒ7:9¼€11:7:Y²21:9:™"FIRST FOR I=1,":7:™"‘THEN FOR I=2,÷‚7:™"‘THEN FOR I=c,":7:™"‘ETC., AND FINALLY FOR I=10.;„™"‘‘":7:Y1²18:Y2²24:13:9:™"THE NEXT’ STATEMENT BRACKETS THEŠ†™"INSTRUCTIONS WHICH ARE TO BE REPEATEDLY":™"EXECUTED FOR EACH VALUE OF I.Ôˆ7:™"THERE MUST A NEXT’ STATEMENT TO MATCH":™"EVERY FOR’ STATEMENT.! Š7:™"“A USEFUL OPTION ON THE FOR’ STATEMENT":™"IS THE STEP’ WHICH IS";h Œ™" ILLUSTRATED":™"IN THE FOLLOWING EXAMPLE:":7:™" 2 FOR I=1 TO 6¸ Ž™" 4 READ A(I)":™" 6 NEXT I":™" 8 FOR I=6 TO 1 STEP -1":™" 10 PRINT A(I)ò ™" 12 NEXT I":™" 14 DATA 3.2, 2, 5.1, 0.1, 66, .7":72 ’™"THE NUMBERS ARE FIRST STORED IN THE":™"LIST A(I).":Y²6:7f ”9:M²1¤20:™£9)"A(I)‘":™£9)"A(I)‘":L²1¤60:‚:‚ –Y²15:9:™"THE SECOND LOOP (LINES 8 THROUGH 12)":7Ú ˜Y²8¤10:9:11:‚:Y²16:9:™"WILL PRINT OUT THE NUMBERS IN š™"REVERSE ORDER.":7:™"SINCE THE STEP IS SPECIFIED TO BE -1,e œ™"I’ WILL BEGIN WITH THE VALUE 6, THEN":™"I=5, THEN I=4, ETC., AND";w ™" FINALLY ";Á ž™"I=1.":7:™"WHEN NO STEP’ IS SPECIFIED, A VALUE":™"OF 1 IS ASSUMED.þ  7:™"“THE GENERAL FORMAT OF THE FOR":™"STATEMENT IS:":77 ¢™"LINE NO.’ FOR VARIABLE’ = Y’ TO Z’ STEP S":7 ¤™"WHERE Y, Z, AND S’ ARE ANY NUMBER,":™"VARIABLE, OR EXPRESSION.":7½ ¦™"THE GENERAL FORMAT OF THE NEXT":™"STATEMENT IS:":7ã ¨™" LINE NO.’ NEXT VARIABLE":72 ª™"WHERE VARIABLE’ IS THE SAME VARIABLE":™"NAME USED IN THE FOR STATEMENT.9 ¯7l ÒC$²" ":3:™"END OF LESSON 7 PART 2  ÔV$²"":™"";:‹¸(0)±999§500» ×™"PRESS SHIFT-RUN"V$:€Ù ÙXXXXXXXXXXXXXXXXXXXXXXXXÛXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'ÝXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNßXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXuáXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXœãXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXÃåXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXêæXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXçXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX8èXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_éXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxêXXXXXXXXXXXXXXXXXXX˜ô™"LOADING, PLEASE WAIT"V$:“Z$²Ç(34):‰16>Y²U1:9:™"Ï":I²0¤U2«U1«2:™"¥":‚:™"Ì":Žo™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";ŒI²1¤38:™""C$"";:‚:™C$§I²1¤23:™"‘"C$"";:‚:ŽÇY²U1:9:I²0¤U2«U1:™" ":‚:ŽØ¡A$:‹A$²""§7à™:Ž ™"":I²0¤Y«1:™"";:‚:™"‘‘";:ŽG Y²Y1:9:I²1¤Y2«Y1:™" ":‚P9:Ž”C$²"#":3:™""£16)"LESSON 8":™£12)"1. HOMEWORK EXPLAINED×™£12)"2. GOSUBÎRETURN":™£12)"3. ON¤GOTO":™£12)"4. ON¤GOSUB":7™"“"£11)"HOMEWORK EXPLAINED":™"THE FOLLOWING PROGRAM WILL PRINTb™"THE NUMBERS 1 TO 100 AND THE SQUARES":™"IN AN ADJACENT COLUMN:{™"1 FOR I = 1 TO 100ž™"2 PRINT I, I*I":™"3 NEXT":7à"™"“"£13)"GOSUBÎRETURN":™"FREQUENTLY, LARGER PROGRAMS REQUIRE+$™"REPEATED EXECUTION OF A GROUP OF":™"STATEMENTS CALLED A SUBROUTINE.Z&™"WE USE THE GOSUB’ STATEMENT TO TELL THE‡(™"COMPUTER TO GO EXECUTE THE SUBROUTINE.µ*™"THE FORMAT OF THE GOSUB STATEMENT IS:ø,™" LINE #1’ GOSUB LINE #2":™"WHEN LINE #1 IS EXECUTED, THE.™"COMPUTER WILL JUMP TO LINE #2.k0™"THE COMPUTER WILL RETURN TO THE":™"STATEMENT IMMEDIATELY FOLLOWING THE°2™"GOSUB STATEMENT WHEN A RETURN":™"STATEMENT IS ENCOUNTERED.":7Å3™"":7ø4Y²13:9:™"THE GROUP OF STATEMENTS FROM LINE #27 6™"THROUGH THE RETURN STATEMENT IS CALLED":™"A SUBROUTINE 8™"THE FORMAT OF THE RETURN STATEMENT IS:":™" LINE NUMBER’ RETURNª :™"CONSIDER THE FOLLOWING PROGRAM:":7ö >™"“ 2 FOR I=1 TO 100":™" 4 INPUT N$, H, R":™" 6 GOSUB 12":™" 8 NEXTE @™" 10 GOTO 22":™" 11 REM PAY CALCULATION SUBROUTINE":™" 12 IF H>40 THEN 18m A™" 14 PRINT N$ "Z$" EARNED "Z$" H*R¢ B™" 16 RETURN":™" 18 LET S= 40*R + (H-40)*1.5 * Rå D™" 20 PRINT N$ "Z$" EARNED "Z$" S":™" 21 RETURN":™" 22 END":71 F™"THIS PROGRAM WILL COMPUTE THE SALARY":™"EARNED FOR 100 EMPLOYEES.":7H JY1²15:Y2²24:13:9s M™"IN LINE 4 THE EMPLOYEE'S NAME, HOURS˜ N™"WORKED AND RATE ARE INPUT.":7á P™"LINE 6 INSTRUCTS THE COMPUTER TO JUMP":™"TO LINE 12.":7:U1²3:U2²7è Q2 R13:Y²15:9:™"LINE 12 DETERMINES IF HE WORKED MORE8 T™"THAN 40 HOURS.":7ˆ V™"IF SO, THE COMPUTER JUMPS TO LINE 18":™"WHERE HIS PAY, INCLUDING OVERTIMEÈ X™"IS CALCULATED AND STORED IN S.":7:U1²8:U2²10:2:Y²22:7 Z9:™"LINE 20 PRINTS THE EMPLOYEES":™"NAME AND SALARY EARNED.":7I \U1²3:6:13:Y²15:9:™"LINE 21 INSTRUCTS THE COMPUTER TOy ^™"RETURN TO LINE 8.":7:U1²4:U2²12:2:7:6® `Y²18:9:™"IF NOT OVER 40 HOURS, LINE 14 COMPUTESÐ b™"AND PRINTS OUT HIS PAY.":7d™"LINE 16 INSTRUCTS THE COMPUTER TO":™"RETURN TO LINE 8.":7+fU2²9:2:7:6:Y²23:9kh™"AT THIS POINT, THE LOOP WILL REPEAT.";:7:U1²1:U2²4:2:7~i6:13:Y²15:9Ìj™"LINE 10 INSTRUCTS THE COMPUTER TO JUMP":™"TO LINE 22 TO TERMINATE THE";l™" PROGRAM":™"WHEN THE 100TH NAME HAS BEEN ENTERED.":7:U1²5:U2²13n2:7QC$²"#":3:™"END OF LESSON 8 PART 1„’V$²"":™"";:‹¸(0)±999§850Ÿ•™"PRESS SHIFT-RUN"V$:€²R™"LOADING"V$:“)Q$²"‘ ‘":‰9Z™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";wI²1¤38:™""C$"";:‚:™C$’I²1¤23:™"‘"C$"";:‚:Ž£¡A$:‹A$²""§7«™:ŽË ™"“"£11)"GOSUB (CONTINUED) p™" 2 LET A=1":™" 4 GOSUB10":™" 6 PRINT A":™" 8 GOTO12Kr™" 10 LET A=A*10":™" 12 END":™"WHAT WILL BE PRINTED OUT WHEN™t™"THIS PROGRAM IS EXECUTED:":™"1.’ 1 2.’ 10 3.’ NOTHINGÁv…"(1,2 OR 3)";A$:‘Å(A$)‰124,130,140Îw™Q$:‰118|™"NO, YOU FORGOT THAT THE GOSUB CAUSES":™"THE COMPUTER TO JUMP TO LINE 106~™"TRY AGAIN!":7:‰9v‚™"NO, WHERE IS THE RETURN STATEMENT!":™"TRY AGAIN!":7:‰9¥Œ™"THAT'S RIGHT, NOTHING WILL BE PRINTED.ËŽ™"IF WE WANTED A’ TO BE PRINTED,™"WE NEED TO ADD":™" 11 RETURN":™"TO THE PROGRAM.":7H’™"“"£16)"ON¤GOTO":™"RECALL THAT THE GOTO STATEMENT ALLOWEDs”™"THE COMPUTER TO JUMP TO A SPECIFIED" –™"LINE IN THE PROGRAM DURING EXECUTION.ð˜™"SIMILARLY, THE ON¤GOTO’ ALLOWS THE":™"COMPUTER TO JUMP TO ONE OF SEVERAL2š™"POSSIBLE LINES DEPENDING ON THE VALUE":™"OF AN EXPRESSION.bœ™"AN EXAMPLE OF AN ON¤GOTO’ STATEMENT IS:¥ž™" 80 ON J GOTO 10, 90":™"IF J HAS THE VALUE 1, THE COMPUTERä ™"JUMPS TO LINE 10.":™"IF J HAS THE VALUE 2, THE COMPUTER( ¢™"JUMPS TO LINE 90.":™"IF J HAS ANY OTHER VALUE, THEN THE LINEV £™"FOLLOWING 80 WILL BE EXECUTED NEXT.":7† ¤™"“THE FORMAT OF THE ON¤GOTO STATEMENT IS:· ¦™"LINE#’ ON X’ GOTO LIST OF LINE NUMBERSè ¨™"WHERE ’X’ IS A VARIABLE OR AN EXPRESSION: ª™"HERE ARE TWO MORE EXAMPLES:J ¬™"2 ON F GOTO 5, 5, 6":™"14 ON V+2 GOTO 33, 10, 2, 2":7 °™"“WHICH OF THE FOLLOWING IS AN":™"ACCEPTABLE ON¤GOTO STATEMENT:Õ ²™"20 ON K-2 GOTO 10, J, 30":™"50 ON (U-V)/L GOTO 68, 55, 2, 88 ´™"70 ON X,Y GOTO 89,66":…"(20, 50 OR 70)’";A$:‹A$²"70"§190' µ‹A$²"50"§2008 ¶‹A$²"20"§184I ·™Q$"‘‘":‰180™ ¸™"NO, THIS IS NOT AN ACCEPTABLE ON¤GOTO":™"BECAUSE LINE NUMBERS MAY NOT BE º™"VARIABLES.":™"TRY AGAIN!":7:‰176 ¾™"NO, THIS IS NOT AN ACCEPTABLE ON¤GOTO":™"STATEMENT BECAUSE X,Y’ IS NOT> À™"AN EXPRESSION.":™"TRY AGAIN!":7:‰176| È™"RIGHT, LINE 50 IS AN":™"ACCEPTABLE ON¤GOTO STATEMENT.É Ê™"NOTE THAT LINE 20 IS UNACCEPTABLE":™"BECAUSE OF THE J’ AND LINE 70 IS Ì™"UNACCEPTABLE BECAUSE X,Y’ IS NOT AN":™"EXPRESSION.":7G Ι"“"£16)"ON¤GOSUB":™"AN INSTRUCTION SIMILAR TO THE ON¤GOTO† Й"IS THE ON¤GOSUB.":™"THE ON¤GOSUB ALLOWS THE COMPUTER TOÏ Ò™"JUMP TO ONE OF SEVERAL SUBROUTINES":™"DEPENDING ON THE VALUE OF AN Ô™"EXPRESSION.":™"WHEN A RETURN STATEMENT IS ENCOUNTERED,]Ö™"THE COMPUTER JUMPS BACK TO THE LINE":™"IMMEDIATELY FOLLOWING THE ON¤GOSUB™Ø™"STATEMENT.":™"THUS, THE RETURN ACTS THE SAME AS WITHËÚ™"THE GOSUB STATEMENT.":7:™"“AN EXAMPLE IS:åÜ™"7 ON E GOSUB 5, 2Þ™"THE FORMAT OF THE ON¤GOSUB STATEMENT IS:Fà™"LINE#’ ON X’ GOSUB LIST OF LINE NUMBERSzâ™"WHERE X’ IS A VARIABLE OR AN EXPRESSION.":7§C$²"#":3:™""£12)"END OF LESSON 8"Õ’™""£12)"LOAD LESSON#9-1":™" ‰16@D$²"“NOTE: YOU MAY USE THIS PROGRAM BY LOADING "q™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";ŽI²1¤38:™""C$"";:‚:™C$©I²1¤23:™"‘"C$"";:‚:ŽÏE$²" UPON COMPLETION OF LESSON 9.à¡A$:‹A$²""§7è™:Ž  ™"":I²0¤Y«1:™"";:‚:™"‘‘";:Ž< J²1¤8:™">";:I²1¤50:‚:™" ";:K²1¤50:‚:‚:Ž… Y²Y1:9:I²0¤Y2«Y1:™" ":NEXKŽ9:Ž I²1¤1000:‚:ŽÝZ$²Ç(34):C$²"Ö":3:™""£13)"LESSON 9":™£7)"1. ";™"SAVING PROGRAMS":™£7)"2. SAMPLE PROGRAMS":™£9)"A. ANIMATIONN™£9)"B. DEPRECIATION":™£9)"C. ADDRESS LIST…™£9)"D. MEAN & STANDARD DEVIATION":™£9)"E. RANKING¾™£9)"F. WORD GAME":7:™"“"£12)"SAVING PROGRAMS":36í™"“THE REST OF THIS LESSON CONSISTS ";9™"OF SIX":™"SAMPLE PROGRAMS.":™"THEY ARE DESIGNED TO ILLUSTRATE A WIDEŠ™"VARIETY OF APPLICATIONS PROGRAMMED IN BASIC, USING ONLY THE INSTRUCTIONSÊD$²"“NOTE:YOU MAY USE THIS PROGRAM BY LOADING"÷™"LEARNED IN THIS INTRODUCTORY COURSE.C™"EACH OF THESE PROGRAMS IS STORED UNDER ITS OWN PROGRAM NAME FOLLOWINGsE$²" UPON COMPLETION OFLESSON 9.½™"THE END OF LESSON NINE. THUS YOU":™"CAN USE ANY OF THE SIX PROGRAMSõ ™"BY LOADING THE APPROPRIATE PROGRAM NAME.":7:‰100E $™"AFTER YOU HAVE WRITTEN A PROGRAM ON":™"YOUR PET YOU MAY WISH TO SAVE IT,o &™"FOR LATER USE, ON A CASSETTE TAPE.» (™"FIRST PLACE A CASSETTE TAPE IN THE DECK.":™"HAVING DECIDED ON A NAMEø *™"FOR YOUR PROGRAM, FOR":™"EXAMPLE, LINPRO, YOU ENTER:3 ,™"SAVE ";Z$;"LINPRO";Z$:™"AND PRESS THE RETURN KEY.k .™"THIS PROGRAM WILL THEN BE SAVED ON THE TAPE.":7² 0™"“"£12)"LOADING PROGRAMS":™"WHEN YOU WANT TO LOAD A PROGRAM INTOÝ 1™"THE COMPUTER FROM THE CASSETTE TAPE,+ 2™"FOR EXAMPLE, LINPRO, FIRST REWIND THE TAPE IF NECESSARY, THEN ENTER:g 4™"LOAD ";Z$;"LINPRO";Z$:™"AND PRESS THE RETURN KEY.£ 6™"THE PROGRAM WILL THEN BE LOADED INTO":™"YOUR PET.":7© 7Ž° c7è d™"“"£15)"ANIMATION":™"THE FOLLOWING SIMPLE PROGRAM8 f™"ILLUSTRATES HOW TO CREATE ANIMATED":™"CHARACTERS.":™"NOTE: Ý’ IS THE ";} h™Z$;"CURSOR LEFT"Z$" KEY.":™"5 FOR I = 1 TO 39":™"7 PRINT "Z$;Æ j™" Ñ"Z$";":™"9 NEXT":™"11 FOR I = 1 TO 39":™"13 PRINT"Z$" Ñ"Z$"; l™"15 NEXT":™"17 GOTO 5":™"TRY IT!":7:™D$:™Z$"ANIMATION"Z$E$:7O ,™"“"£13)"DEPRECIATION":™"THIS PROGRAM WILL COMPUTE THE ANNUALž 6™"DEPRECIATION AND BOOK VALUE FOR AN ASSET(USING THE STRAIGHT-LINE METHOD)ß 8™"10 PRINT ";Z$;"ENTER ASSET INITIAL VALUE";Z$:™"20 INPUT I :™"30 PRINT ";Z$;"ENTER ASSET LIFE(IN YEARS)";Z$:™"40 INPUT NW<™"50 PRINT "Z$"ENTER SALVAGE VALUE"Z$:™"60 INPUT S¡>™"70 PRINT "Z$"END OF YEAR"Z$","Z$"DEPRECIATION"Z$","Z$"BOOK VALUE"Z$è@™"80 FOR K = 1 TO N":™"90 B = B-(I-S)/N":™"100 PRINT K, (I-S)/N, B#B™"110 NEXT":™"120 END":7:™D$:™Z$"DEPRECIATION"Z$E$:7V C$²"Ö":3:™"";£9)"END OF LESSON 9 PART 1†4V$²"": ™£9)"";:‹¸(0)±999§900¡>™"PRESS SHIFT-RUN"V$:€Á„™"LOADING, PLEASE WAIT"V$:“;E$²"UPON COMPLETION OF LESSON 9.":C.77JAMES&LODEWYCKZ$²Ç(34):D$²"“NOTE:YOU MAY USE THIS PROGRAM BY LOADING ":‰680°™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";ÍI²1¤38:™""C$"";:‚:™C$èI²1¤23:™"‘"C$"";:‚:Žù¡A$:‹A$²""§7™:ŽN™"EACH OF THESE PROGRAMS IS STORED UNDER ITS OWN PROGRAM NAME FOLLOWING—|™"“"£6)"MEAN AND STANDARD DEVIATION":™"THE FOLLOWING PROGRAM WILL";è~™" COMPUTE":™"THE MEAN AND STANDARD DEVIATION FOR AN ARBITRARY NUMBER OF ";ú€™"VALUES.":74™"“"£6)"MEAN AND STANDARD DEVIATION":™"10 DIM X(500)j’™"20 PRINT "Z$"HOW MANY VALUES"Z$";":™"30 INPUT N¶“™"40 PRINT "Z$"ENTER THE VALUES, ONE AT A TIME (PRESS RETURN AFTER EACHú”™£26)"‘ ENTRY)":™"50 FOR I = 1 TO N":™"60 INPUT X(I)":™"70 NEXT?–™"80 M = 0":™"90 FOR I = 1 TO N":™"100 M = M + X(I)":™"110 NEXT"˜™"120 M = M/N":™"130 S = 0":™"140 FOR I = 1 TO N":™"150 S = S + (X(I) - M)^2Úš™"160 NEXT":™"170 S = S/(N - 1)^.5":™"180 PRINT ";Z$;"MEAN IS ";Z$;"Mœ™"190 PRINT "Z$"STANDARD DEVIATION IS "Z$"S":™"200 END":7Hž™D$:™Z$"MEAN & STANDARD DEVIATION"Z$:™:™E$TŸ7:‰800™¨™"“"£14)"ADDRESS LIST":™"THE FOLLOWING PROGRAM ILLUSTRATES HOW䪙"DATA MAY BE STORED ALONG WITH A PROGRAM.":™"IN THIS EXAMPLE, THE ";) ¬™"DATA CONSISTS OF":™"A LIST OF NAMES ALONG WITH CORRESPONDING";T ­™"ADDRESSES AND TELEPHONE NUMBERS.":7š ¼™"“"£8)"ADDRESS AND TELEPHONE LIST":™"10 PRINT "Z$"ENTER NAME"Z$¬ ¾™"20 INPUT N$½ À™"30 READ L$ç ™"40 IF L$ ="Z$" ENDLIST"Z$" THEN 990 Ä™"50 READ A1$,A2$,T$ Æ™"60 IF L$ <> N$ THEN 30> È™"70 PRINT "Z$"NAME: "Z$L$` Ê™"80 PRINT "Z$"ADDRESS:"Z$A1$‚ Ì™"90 PRINT "Z$" "Z$A2$¥ Ι"100 PRINT "Z$"PHONE: "Z$;T$· Ò™"110 GOTO999î Ô™"200 DATA "Z$"RON REEDLY"Z$","Z$"155 ALPHA ST."Z$ Ö™"202 DATA "Z$"KNOXVILLE,TENN. 34321"Z$? Ø™"203 DATA "Z$"(821) 622-3285"Z$x Ú™"301 DATA "Z$"COMMODORE"Z$","Z$"3330 SCOTT BLVD."Z$¤ Ü™"302 DATA "Z$"SANTA CLARA, CA 95050"Z$É Þ™"303 DATA "Z$"(408) 727-1130"Z$å à™"980 DATA "Z$"ENDLIST" â™"990 PRINT N$ "Z$" NOT IN LIST"Z$D ä™"999 END":7:™D$:™Z$"ADDRESS LIST"Z$:™:™E$:7:‰380k ð<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>’ ò<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>¹ ô<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>à ö<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>> øÃÖÂÎͬ»¿ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»1 úÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎÍX üÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎÍ þÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͦ ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎÍÍ ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂÎÍõ ÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂÎÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂÎEÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂÎm ÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂΕ ÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂνÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂÎåÃÖÂÎͬ»ÃÖÂÎͬ»»ÃÖÂÎͬ»ÃÖÂÂÎͬ»ÃÖÂÎ ÃÖÂÎͬ»ÃÖÂÎͬ»ÃÖÂͬ»ÃÖÂÎͬ»ÎÍÎÍÎÍC C$²"Ö":3:™"END OF LESSON 9 PART 2s4V$²"":™"";:‹¸(0)±999§900Ž>™"PRESS SHIFT-RUN"V$:€®„™"LOADING, PLEASE WAIT"V$:“OE$²"UPON COMPLETION OF LESSON 9.":Z$²Ç(34):C.77JAMES&LODEWYCK2096348888‰D$²"“NOTE:YOU MAY USE THIS PROGRAM BY LOADING":‰480º™"“":I²1¤39:™C$;:‚:I²1¤22:™""C$;:‚:™"";×I²1¤38:™""C$"";:‚:™C$òI²1¤23:™"‘"C$"";:‚:Ž¡A$:‹A$²""§7 ™:ŽJà™"“"£17)"RANKING":™"THE FOLLOWING PROGRAM WILL DETERMINE™â™"THE RANKING OF A LIST OF UP TO 100":™"NAMES ACCORDING TO SOME ASSOCIATEDÞä™"(NON-NEGATIVE) NUMERICAL VALUE.":™"EXAMPLES OF USES INCLUDE:晣5)"RANK STUDENTS BY EXAM SCORES"/癣5)"RANK CREDIT ACCOUNTS BY BALANCEY虣5)"RANK STOCKHOLDERS BY SHARES HELD陣5)"RANK ITEMS IN INVENTORY BY":™£10)"DOLLAR VALUE":™£5)"ETC.¤ê7Ûô™"“"£18)"RANKING":™"10 DIM N$(100), S(100),PT(100)õ™"20 PRINT "Z$"HOW MANY ENTRIES IN LIST"Z$:™"30 INPUT NPö™"40 PRINT "Z$"ENTER "Z$" N "Z$" NAMES AND VALUES"Z$hø™"50 FOR I = 1 TO NŒù™"60 INPUT N$(I), S(I)":™"70 ";Óú™"NEXT":™"80 FOR I = 1 TO N":™"90 M = -99999":™"100 FOR J = 1 TO Nü™"110 IF S(J) <= M THEN 140":™"120 M = S(J)":™"130 IS = J":™"140 NEXT"oþ™"150 PT(I) = IS":™"160 S(IS) = -S(IS)":™"170 NEXT":™"180 PRINT ";Z$;"RANK";´™Z$","Z$"NAME"Z$","Z$"VALUE"Z$:™"190 PRINT":™"200 FOR I = 1 TO Nó™"210 K = PT(I)":™"220 PRINT I,N$(K),-S(K)":™"230 NEXT":7 ™D$:™Z$"RANKING"Z$:™E$:7P X™"“"£15)"WORD GAME":™"THE FOLLOWING PROGRAM IS A LEARNING‡ Z™"GAME.":7:™"WHEN THE COMPUTER PUTS A WORD ON THEÖ [™"SCREEN, THE USER MUST RESPOND WITH A":™"SYNONYM (WORD WHICH HAS THE SAMEç \™"MEANING)./ ^™"THE COMPUTER WILL INDICATE WHETHER THE ANSWER IS CORRECT OR NOT.~ `™"EACH WORD AND ITS SYNONYMS ARE STORED IN A SEPARATE DATA STATEMENT, SOÏ b™"THE QUANTITY AND LEVEL OF DIFFICULTY OF THE WORDS MAY BE EASILY CHANGEDé d™"BY THE TEACHER.":76 l™"“10 READ N":™"20 FOR I = 1 TO N":™"30 READ W$,NS":™"40 FOR K = 1 TO NS n™"50 READ S$(K)":™"60 NEXT":™"70 PRINT"Z$"GIVE A SYNONYM FOR "Z$";W$Ð p™"80 INPUT R$":™"90 IF R$ = ";Z$;"HELP";Z$;" THEN 170":™"100 FOR K = 1 TO NS r™"110 IF R$ = S$(K) THEN 150":™"120 NEXT":™"130 PRINT"Z$"NO!";a t™"TRY AGAIN-OR TYPE HELP"Z$:™"140 GO TO 80":™"150 PRINT ";Z$;"CORRECT!"Z$ v™"160 GOTO 210":™"170 PRINT W$"Z$" HAS THE SYNONYMS:"Z$î x™"180 FOR K=1 TO NS":™"190 PRINT S$(K)":™"200 NEXT":™"210 NEXT":™"220 DATA 2 z™"230 DATA SOAR,3,FLY,RISE,TOWER< |™"240 DATA GYP,3,CHEAT,SWINDLE,TRICK_ Š7:™D$:™Z$"WORD GAME"Z$:™E$:7™ C$²"Ö’":3:™"THIS CONCLUDES THE COURSE INÇ 4™"BEGINNING BASIC FOR THE PET’ñ H™"YOU SHOULD NOW BE ABLE TO CREATE=\™"YOUR OWN PROGRAMS TO PERFORM AN":™"INFINITY OF TASKS.kf™"CONGRATULATIONS AND GOOD LUCK! ANIMATION PROGRAM; MOVE BALL TO THE RIGHT ===>L I ² 1 ¤ 39Y™ " Ñ";_ ‚ MOVE BALL TO THE LEFT <===’ I ² 1 ¤ 39  ™" Ñ";¦‚³ REPEAT»‰ 5" << DEPRECIATION PROGRAM >>q THIS PROGRAM WILL COMPUTE ANNUALÀ DEPRECIATION USING THE STRAIGHT- LINE METHOD (INITIAL-SALVAGE)/LIFEâ ™ "ENTER ASSET INITIAL VALUE"ê… I™ "ENTER ESTIMATED LIFE OF ASSET(IN YEARS)""(… NH2™ "ENTER ESTIMATED SALVAGE VALUE"P<… SwF™ "END YEAR","DEPREC","BOOK VALUE"KB²IŽP K ² 1¤ NÓU BOOK VALUE IS REDUCED EACH YEAR BY THE ANNUAL DEPRECIATIONåZB ² B«(I«S)­Nùd™ K, (I«S)­N, Bÿn‚x€O << ADDRESS LIST PROGRAM >> THIS PROGRAM ALLOWS YOU TO STOREœ NAMES, ADDRESSES, & PHONE NUMBERS AND RETRIEVE THEM AT ANY TIME.é ENTER A NAME PREVIOUSLY STORED IN THE LIST, AND THE INFO WILL BE: PRINTED OUT. ---------------------------------M ™ "ENTER NAME"V… N$_‡ L$z(‹ L$ ² "ENDLIST" § 990‹2‡ A1$,A2$,T$Ÿ<‹ L$ ³± N$ § 30³F™ "NAME: " N$ÇP™ "ADDRESS:"A1$ÛZ™ " "A2$îd™ "PHONE: "T$÷n‰999=p NOTE:TO OBTAIN THE REST OF THE LISTING, ENTER LIST-110Cri”--------------------------------ª– NEW NAMES MAY BE ADDED TO THE LIST AT ANY TIME -ò˜ ADD ENOUGH DATA STATEMENTS FOR EACH ENTRY IN THE LIST TO(š INCLUDE "NAME","STREET","CITY", "PHONE"uœ -------------------------------˜ȃ "RON REEDLY","155 ALPHA ST."¶ʃ "KNOXVILLE,TENN. 34321"Í˃ "(821) 622-3285"ò-ƒ "COMMODORE","3330 SCOTT BLVD.".ƒ "SANTA CLARA, CA 95050"'/ƒ "(408) 727-1130"7Ôƒ "ENDLIST"OÞ™ N$ " NOT IN LIST"Uç€$O << MEAN & STANDARD DEVIATION >> << PROGRAM >>› THIS PROGRAM WILL COMPUTE THEç MEAN AND STANDARD DEVIATION OF UP TO 300 NUMBERS (DATA VALUES). ================================= † X(300):™ "HOW MANY DATA VALUES";B… NŠ(™ "ENTER THE VALUES, ONE AT A TIME (PRESS RETURN AFTER EACH ENTRY)š2 I ² 1 ¤ NÓ7 THE DATA VALUES ARE FIRST STORED IN ARRAY XÞ<… X(I)äF‚.H NOTE:TO OBTAIN THE REST OF THE LISTING, ENTER LIST-708PM ² 0lU SUM THE VALUES STORED IN THE ARRAY|Z I ² 1 ¤ NdM ² M ª X(I)“n‚Ês DIVIDE THE SUM BY N TO YIELD THE MEANÖxM ² M­Nà‚S ² 0‡ SUM THE SQUARED DEVIATIONSŒ I ² 1 ¤ N*–S ² S ª (X(I) « M)®20 ‚|¥ DIVIDE THE SUM BY N-1 AND THEN TAKE THE SQUARE ROOT TO YIELD™§ THE STANDARD DEVIATION°ªS ² (S­(N « 1))®.5´™ "MEAN IS "Mâ¾™ "STANDARD DEVIATION IS "SèÈ€B << RANKING PROGRAM >> ===============Ž THIS PROGRAM WILL COMPUTE THE ORDER OF RANKING OF UP TO 100Í NAMES BASED UPON AN ASSOCIATED NUMERICAL VALUE. FOR EXAMPLE, STUDENTS BY EXAM SCORES.) -------------------------------H † N$(100), S(100), PT(100)i™ "HOW MANY ENTRIES IN LIST"q… N‘(™"ENTER "N"NAMES AND VALUES¿/™"PRESS RETURN AFTER EACH NAME,VALUE PAIRÏ2 I ² 1 ¤ Nà<… N$(I),S(I)æF‚)K ENTER LIST-74 TO OBTAIN FIRST PART OF THE LISTING.wM FIRST FIND THE LARGEST VALUE. THEN INDICATE ITS POSITION IN S¸N BY STORING ITS SUBSCRIPT IN THE 'POINTER' ARRAY PTO THEN FIND THE SECOND LARGEST # & STORE ITS SUBSCRIPT, ETC.P I ² 1 ¤ N!ZM ² «999991d J ² 1 ¤ NGn‹ S(J) ³² M § 140TxM ² S(J)_‚IS ² JeŒ‚t–PT(I) ² IS‡ S(IS) ² «S(IS)ª‚©´™ "RANK","NAME","VALUE"¹È I ² 1 ¤ NÇÒK ² PT(I)ÛÜ™ I,N$(K),«S(K)áæ‚ " << WORD GAME PROGRAM >>p THIS PROGRAM MAY BE USED TO HELP TEACH CHILDREN ABOUT SYNONYMS -¾ WORDS WHICH HAVE THE SAME MEANING. NEW WORDS MAY BE ADDED  OR OLD WORDS DELETED AT ANY TIME, SO THE TEACHER CAN TAILOR THEB PROGRAM TO THE LEVEL OF THE STUDENTS.i ================================q ‡ N I²1 ¤ N‹‡ W$,NSœ( K ² 1 ¤ NS¨2‡ S$(K)®<‚ÌF™ "GIVE A SYNONYM FOR "W$ÕP… R$íZ‹ R$ ² "HELP" § 170þd K ² 1 ¤ NSCi TO OBTAIN THE REST OF THE LISTING ENTER LIST110-hk ENTER LIST-105 TO GET 1ST PARTn‹ R$ ² S$(K) § 150…x‚¦‚™"NO!TRY AGAIN-OR TYPE HELP"¯Œ‰ 80À–™ "CORRECT!"Ê ‰ 210窙 W$" HAS THE SYNONYMS:"ö´ K²1 ¤ NS¾™ S$(K)È‚Ò‚ I]Ô TO ADD A NEW WORD: 1. INCREASE THE NUMBER IN DATAªÕ STATEMENT 220 BY 1. 2. ADD ONE OR MORE DATA STATE-òÖ MENTS, AS NECESSARY, TO INCLUDE WORD, NUMBER OF SYNONYMS,× SYNONYM#1, SYNONYM#2, ...ETC2Ø USE LINE NUMBERS > 220:܃ 2Væƒ SOAR,3,FLY,RISE,TOWERvðƒ GYP,3,CHEAT,SWINDLE,TRICKÛ$$$$$