Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_23.ADF » F/TUT1
F/TUT1
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 » Acorn ADFS disks » Electron_User_Group » EUG_23.ADF |
Filename: | F/TUT1 |
Read OK: | ✔ |
File size: | 1895 bytes |
Load address: | 54204556 |
Exec address: | D315455 |
File contents
Introduction to programming. Type in: PRINT"A" then press RETURN. The letter A will appear underneath. Type in: PRINT A then press return and the computer will print the message: No such variable The " marks, called quotes in the first example told the computer that anything inside the two quotes should be printed as it is. In the second example there are no quotes so the computer assumed that what came after represented something, called a variable and since the computer hasn't been told about any variables it told you so. Type in: 10 A=5 then press RETURN Type in: 20 PRINT A the press RETURN Type in RUN then press RETURN and the number 5 will appear on the screen. This is a simple program. In line 10 you told the computer that A=5. The computer now assumes that there is a variable called A and it equals 5. Then in line 20 you told the computer to PRINT A. The computer assumes that A is a variable and checks to see if it has been told about this variable, it has and so it prints what it believes this variable represents in this case 5. Type in: 10 INPUT A 20 PRINT A now RUN the program and a ? will appear on the screen. Press a number and RETURN and that number will appear on the screen. Here, in line 10 you told the computer INPUT A. The computer took this as meaning wait for a number to be typed in followed by RETURN, assign this number to the variable called A In line 20 the computer was again told to PRINT A so it did and printed the number you typed in in line 10. So far, PRINT tells the computer to try to print what follows. If what follows is enclosed within quotes then this is printed as it originally was entered. If not it is treated as a variable. A variable is something which the computer assumes will have some information which it can act upon such as PRINT. It is called a variable because it can infact have different information at different times. This was demonstrated using the command INPUT where A was equal to any number you happened to type in. Mark is GOOD Tom is BAD. If I say to you who is GOOD you say Mark. Equally who is BAD you say Tom GOOD and BAD are variables with GOOD holding the information Mark and BAD holding the information Tom The computer in fact will understand three types of variables, each is a little different with different advantages and disadvantages and each needs to be handled in a different way. The variable we used above was called a Real variable. It can in fact store numbers and decimal fractions such as 3.14 I gave it the name A but it can in fact have almost any name. Type in: 10 INPUT A 20 INPUT B 30 C=A+B 40 PRINT C and RUN this program. You will see a ? as before from line 10, enter a number, try a decimal number such as 3.14. After RETURN another ? will appear this time from line 20 and you can enter another number. After pressing RETURN the computer will add these two numbers together in line 30 and print the result in line 40. Notice that in line 30 the sum is written with the result before the sum itself. What line 30 is saying to the computer is a variable called C will be equal to a variable called A added to a variable called B. To subtract A from B you would use - To multiply A with B you would use * To divide A by B you would use / The symbols for multiply and divide used by the computer are different from those used by us on paper. Another variable is called an integer variable. An integer is a whole number, that is one which does not include any fractions. 5 is an integer, 5.25 and 5 1/2 are not because they include fractions. An integer is indicated by a % sign after the variable name. In comon speach this sign is called percent so A% is...A percent. In fact if you wrote the last program using interger variables instead and entered say 3.14 it would be treated as 3 with the .14 being ignored. Integer variables are processed by the computer more quickly than real variables, they can in some circumstances be more accurate and perhaps more importantly integer variables begining with a capital letter of the alphabet such as A% , B% , C% and so on are not cleared when a new program is run or even after pressing BREAK. To mark this special status these particular interger variables are called Resident Integer Variables. This makes then especially useful when seveal program need to be loaded one after another and numbers need to be passed from one program to the next. So much for integer variables. Now the last type of variable is called a string variable. It will hold a string of letters or a single letter. Is is signified by the symbol $ after the variable name ie A$. In this case we would say A dollar. A string variable doesn't actually do anything mathematical it simply stores what it is told and then delivers it when it is told. If you type in the last program again this time making each variable a string variable the result will be each of the characters you typed in being printed on the screen. If you enter 2 then 3 the result will be 23. If you enter FR then ED the result will be FRED. Now there is another word which has been used called INPUT. This word stops a program and wait for information to be typed in. The information can be almost any length from nothing to 255 characters and once the information has been type in the RETURN key must be pressed. INPUT must be followed by a variable name so that whatever is typed in can be put somewhere to be dealt with later. Another word for getting a program to ask for information is GET. This is a particularly easy function to use. It comes in two forms GET and GET$ 10 A=GET 20 PRINT A When this program is RUN the computer will wait for a key to be pressed The ASCII code for that key is put into the variable A and in line 20 A is printed. (Do you know what ASCII codes are?) Now this is a very useful little word. Suppose there's a list of options for the computer to chose from: 1, ask for two numbers and add them together, 2, ask for two number and subtract the second from the first, 3, ask for two numbers and multiply them, 4, ask for two numbers and divide the first by the second. A simple arithmetic program.
00000000 49 6e 74 72 6f 64 75 63 74 69 6f 6e 20 74 6f 20 |Introduction to | 00000010 70 72 6f 67 72 61 6d 6d 69 6e 67 2e 0d 0d 54 79 |programming...Ty| 00000020 70 65 20 69 6e 3a 20 50 52 49 4e 54 22 41 22 20 |pe in: PRINT"A" | 00000030 0d 74 68 65 6e 20 70 72 65 73 73 20 52 45 54 55 |.then press RETU| 00000040 52 4e 2e 20 54 68 65 20 6c 65 74 74 65 72 20 41 |RN. The letter A| 00000050 20 77 69 6c 6c 20 61 70 70 65 61 72 20 75 6e 64 | will appear und| 00000060 65 72 6e 65 61 74 68 2e 0d 0d 54 79 70 65 20 69 |erneath...Type i| 00000070 6e 3a 20 50 52 49 4e 54 20 41 20 0d 74 68 65 6e |n: PRINT A .then| 00000080 20 70 72 65 73 73 20 72 65 74 75 72 6e 20 61 6e | press return an| 00000090 64 20 74 68 65 20 63 6f 6d 70 75 74 65 72 20 77 |d the computer w| 000000a0 69 6c 6c 20 70 72 69 6e 74 20 74 68 65 20 6d 65 |ill print the me| 000000b0 73 73 61 67 65 3a 0d 4e 6f 20 73 75 63 68 20 76 |ssage:.No such v| 000000c0 61 72 69 61 62 6c 65 0d 0d 54 68 65 20 22 20 6d |ariable..The " m| 000000d0 61 72 6b 73 2c 20 63 61 6c 6c 65 64 20 71 75 6f |arks, called quo| 000000e0 74 65 73 20 69 6e 20 74 68 65 20 66 69 72 73 74 |tes in the first| 000000f0 20 65 78 61 6d 70 6c 65 20 74 6f 6c 64 20 74 68 | example told th| 00000100 65 20 63 6f 6d 70 75 74 65 72 20 74 68 61 74 0d |e computer that.| 00000110 61 6e 79 74 68 69 6e 67 20 69 6e 73 69 64 65 20 |anything inside | 00000120 74 68 65 20 74 77 6f 20 71 75 6f 74 65 73 20 73 |the two quotes s| 00000130 68 6f 75 6c 64 20 62 65 20 70 72 69 6e 74 65 64 |hould be printed| 00000140 20 61 73 20 69 74 20 69 73 2e 20 0d 0d 49 6e 20 | as it is. ..In | 00000150 74 68 65 20 73 65 63 6f 6e 64 20 65 78 61 6d 70 |the second examp| 00000160 6c 65 20 74 68 65 72 65 20 61 72 65 20 6e 6f 20 |le there are no | 00000170 71 75 6f 74 65 73 20 73 6f 20 74 68 65 20 63 6f |quotes so the co| 00000180 6d 70 75 74 65 72 20 61 73 73 75 6d 65 64 20 74 |mputer assumed t| 00000190 68 61 74 0d 77 68 61 74 20 63 61 6d 65 20 61 66 |hat.what came af| 000001a0 74 65 72 20 72 65 70 72 65 73 65 6e 74 65 64 20 |ter represented | 000001b0 73 6f 6d 65 74 68 69 6e 67 2c 20 63 61 6c 6c 65 |something, calle| 000001c0 64 20 61 20 76 61 72 69 61 62 6c 65 20 61 6e 64 |d a variable and| 000001d0 20 73 69 6e 63 65 20 74 68 65 0d 63 6f 6d 70 75 | since the.compu| 000001e0 74 65 72 20 68 61 73 6e 27 74 20 62 65 65 6e 20 |ter hasn't been | 000001f0 74 6f 6c 64 20 61 62 6f 75 74 20 61 6e 79 20 76 |told about any v| 00000200 61 72 69 61 62 6c 65 73 20 69 74 20 74 6f 6c 64 |ariables it told| 00000210 20 79 6f 75 20 73 6f 2e 0d 0d 54 79 70 65 20 69 | you so...Type i| 00000220 6e 3a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |n: | 00000230 20 31 30 20 41 3d 35 20 0d 74 68 65 6e 20 70 72 | 10 A=5 .then pr| 00000240 65 73 73 20 52 45 54 55 52 4e 20 0d 54 79 70 65 |ess RETURN .Type| 00000250 20 69 6e 3a 20 20 20 20 20 20 20 20 20 20 20 20 | in: | 00000260 20 20 32 30 20 50 52 49 4e 54 20 41 20 0d 74 68 | 20 PRINT A .th| 00000270 65 20 70 72 65 73 73 20 52 45 54 55 52 4e 20 0d |e press RETURN .| 00000280 54 79 70 65 20 69 6e 20 20 20 20 20 20 20 20 20 |Type in | 00000290 20 20 20 20 20 20 52 55 4e 20 0d 74 68 65 6e 20 | RUN .then | 000002a0 70 72 65 73 73 20 52 45 54 55 52 4e 20 61 6e 64 |press RETURN and| 000002b0 20 74 68 65 20 6e 75 6d 62 65 72 20 35 20 77 69 | the number 5 wi| 000002c0 6c 6c 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65 |ll appear on the| 000002d0 20 73 63 72 65 65 6e 2e 20 0d 0d 54 68 69 73 20 | screen. ..This | 000002e0 69 73 20 61 20 73 69 6d 70 6c 65 20 70 72 6f 67 |is a simple prog| 000002f0 72 61 6d 2e 20 49 6e 20 6c 69 6e 65 20 31 30 20 |ram. In line 10 | 00000300 79 6f 75 20 74 6f 6c 64 20 74 68 65 20 63 6f 6d |you told the com| 00000310 70 75 74 65 72 20 74 68 61 74 20 41 3d 35 2e 20 |puter that A=5. | 00000320 54 68 65 0d 63 6f 6d 70 75 74 65 72 20 6e 6f 77 |The.computer now| 00000330 20 61 73 73 75 6d 65 73 20 74 68 61 74 20 74 68 | assumes that th| 00000340 65 72 65 20 69 73 20 61 20 76 61 72 69 61 62 6c |ere is a variabl| 00000350 65 20 63 61 6c 6c 65 64 20 41 20 61 6e 64 20 69 |e called A and i| 00000360 74 20 65 71 75 61 6c 73 20 35 2e 0d 0d 54 68 65 |t equals 5...The| 00000370 6e 20 69 6e 20 6c 69 6e 65 20 32 30 20 79 6f 75 |n in line 20 you| 00000380 20 74 6f 6c 64 20 74 68 65 20 63 6f 6d 70 75 74 | told the comput| 00000390 65 72 20 74 6f 20 50 52 49 4e 54 20 41 2e 20 54 |er to PRINT A. T| 000003a0 68 65 20 63 6f 6d 70 75 74 65 72 20 61 73 73 75 |he computer assu| 000003b0 6d 65 73 0d 74 68 61 74 20 41 20 69 73 20 61 20 |mes.that A is a | 000003c0 76 61 72 69 61 62 6c 65 20 61 6e 64 20 63 68 65 |variable and che| 000003d0 63 6b 73 20 74 6f 20 73 65 65 20 69 66 20 69 74 |cks to see if it| 000003e0 20 68 61 73 20 62 65 65 6e 20 74 6f 6c 64 20 61 | has been told a| 000003f0 62 6f 75 74 20 74 68 69 73 0d 76 61 72 69 61 62 |bout this.variab| 00000400 6c 65 2c 20 69 74 20 68 61 73 20 61 6e 64 20 73 |le, it has and s| 00000410 6f 20 69 74 20 70 72 69 6e 74 73 20 77 68 61 74 |o it prints what| 00000420 20 69 74 20 62 65 6c 69 65 76 65 73 20 74 68 69 | it believes thi| 00000430 73 20 76 61 72 69 61 62 6c 65 0d 72 65 70 72 65 |s variable.repre| 00000440 73 65 6e 74 73 20 69 6e 20 74 68 69 73 20 63 61 |sents in this ca| 00000450 73 65 20 35 2e 0d 0d 54 79 70 65 20 69 6e 3a 20 |se 5...Type in: | 00000460 31 30 20 49 4e 50 55 54 20 41 20 0d 20 20 20 20 |10 INPUT A . | 00000470 20 20 20 20 20 32 30 20 50 52 49 4e 54 20 41 20 | 20 PRINT A | 00000480 0d 6e 6f 77 20 52 55 4e 20 74 68 65 20 70 72 6f |.now RUN the pro| 00000490 67 72 61 6d 20 61 6e 64 20 61 20 3f 20 77 69 6c |gram and a ? wil| 000004a0 6c 20 61 70 70 65 61 72 20 6f 6e 20 74 68 65 20 |l appear on the | 000004b0 73 63 72 65 65 6e 2e 20 50 72 65 73 73 20 61 20 |screen. Press a | 000004c0 6e 75 6d 62 65 72 20 61 6e 64 0d 52 45 54 55 52 |number and.RETUR| 000004d0 4e 20 20 61 6e 64 20 74 68 61 74 20 6e 75 6d 62 |N and that numb| 000004e0 65 72 20 77 69 6c 6c 20 61 70 70 65 61 72 20 6f |er will appear o| 000004f0 6e 20 74 68 65 20 73 63 72 65 65 6e 2e 0d 0d 48 |n the screen...H| 00000500 65 72 65 2c 20 69 6e 20 6c 69 6e 65 20 31 30 20 |ere, in line 10 | 00000510 79 6f 75 20 74 6f 6c 64 20 74 68 65 20 63 6f 6d |you told the com| 00000520 70 75 74 65 72 20 49 4e 50 55 54 20 41 2e 20 54 |puter INPUT A. T| 00000530 68 65 20 63 6f 6d 70 75 74 65 72 20 74 6f 6f 6b |he computer took| 00000540 20 74 68 69 73 20 61 73 0d 6d 65 61 6e 69 6e 67 | this as.meaning| 00000550 20 77 61 69 74 20 66 6f 72 20 61 20 6e 75 6d 62 | wait for a numb| 00000560 65 72 20 74 6f 20 62 65 20 74 79 70 65 64 20 69 |er to be typed i| 00000570 6e 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 52 45 |n followed by RE| 00000580 54 55 52 4e 2c 20 61 73 73 69 67 6e 20 74 68 69 |TURN, assign thi| 00000590 73 0d 6e 75 6d 62 65 72 20 74 6f 20 74 68 65 20 |s.number to the | 000005a0 76 61 72 69 61 62 6c 65 20 63 61 6c 6c 65 64 20 |variable called | 000005b0 41 0d 0d 49 6e 20 6c 69 6e 65 20 32 30 20 74 68 |A..In line 20 th| 000005c0 65 20 63 6f 6d 70 75 74 65 72 20 77 61 73 20 61 |e computer was a| 000005d0 67 61 69 6e 20 74 6f 6c 64 20 74 6f 20 50 52 49 |gain told to PRI| 000005e0 4e 54 20 41 20 73 6f 20 69 74 20 64 69 64 20 61 |NT A so it did a| 000005f0 6e 64 20 70 72 69 6e 74 65 64 0d 74 68 65 20 6e |nd printed.the n| 00000600 75 6d 62 65 72 20 79 6f 75 20 74 79 70 65 64 20 |umber you typed | 00000610 69 6e 20 69 6e 20 6c 69 6e 65 20 31 30 2e 0d 0d |in in line 10...| 00000620 53 6f 20 66 61 72 2c 20 50 52 49 4e 54 20 74 65 |So far, PRINT te| 00000630 6c 6c 73 20 74 68 65 20 63 6f 6d 70 75 74 65 72 |lls the computer| 00000640 20 74 6f 20 74 72 79 20 74 6f 20 70 72 69 6e 74 | to try to print| 00000650 20 77 68 61 74 20 66 6f 6c 6c 6f 77 73 2e 0d 0d | what follows...| 00000660 49 66 20 77 68 61 74 20 66 6f 6c 6c 6f 77 73 20 |If what follows | 00000670 69 73 20 65 6e 63 6c 6f 73 65 64 20 77 69 74 68 |is enclosed with| 00000680 69 6e 20 71 75 6f 74 65 73 20 74 68 65 6e 20 74 |in quotes then t| 00000690 68 69 73 20 69 73 20 70 72 69 6e 74 65 64 20 61 |his is printed a| 000006a0 73 20 69 74 0d 6f 72 69 67 69 6e 61 6c 6c 79 20 |s it.originally | 000006b0 77 61 73 20 65 6e 74 65 72 65 64 2e 20 49 66 20 |was entered. If | 000006c0 6e 6f 74 20 69 74 20 69 73 20 74 72 65 61 74 65 |not it is treate| 000006d0 64 20 61 73 20 61 20 76 61 72 69 61 62 6c 65 2e |d as a variable.| 000006e0 20 0d 0d 41 1a 20 76 61 72 69 61 62 6c 65 1a 20 | ..A. variable. | 000006f0 69 73 1a 20 73 6f 6d 65 74 68 69 6e 67 1a 20 77 |is. something. w| 00000700 68 69 63 68 1a 20 74 68 65 1a 20 63 6f 6d 70 75 |hich. the. compu| 00000710 74 65 72 1a 20 61 73 73 75 6d 65 73 1a 20 77 69 |ter. assumes. wi| 00000720 6c 6c 1a 20 68 61 76 65 20 73 6f 6d 65 0d 69 6e |ll. have some.in| 00000730 66 6f 72 6d 61 74 69 6f 6e 20 77 68 69 63 68 20 |formation which | 00000740 69 74 20 63 61 6e 20 61 63 74 20 75 70 6f 6e 20 |it can act upon | 00000750 73 75 63 68 20 61 73 20 50 52 49 4e 54 2e 20 49 |such as PRINT. I| 00000760 74 1a 20 69 73 1a 20 63 61 6c 6c 65 64 20 61 20 |t. is. called a | 00000770 76 61 72 69 61 62 6c 65 0d 62 65 63 61 75 73 65 |variable.because| 00000780 1a 20 69 74 20 63 61 6e 20 69 6e 66 61 63 74 20 |. it can infact | 00000790 68 61 76 65 20 64 69 66 66 65 72 65 6e 74 20 69 |have different i| 000007a0 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 74 20 64 69 |nformation at di| 000007b0 66 66 65 72 65 6e 74 20 74 69 6d 65 73 2e 20 54 |fferent times. T| 000007c0 68 69 73 0d 77 61 73 20 64 65 6d 6f 6e 73 74 72 |his.was demonstr| 000007d0 61 74 65 64 1a 20 75 73 69 6e 67 1a 20 74 68 65 |ated. using. the| 000007e0 20 63 6f 6d 6d 61 6e 64 20 49 4e 50 55 54 20 77 | command INPUT w| 000007f0 68 65 72 65 20 41 20 77 61 73 20 65 71 75 61 6c |here A was equal| 00000800 20 74 6f 20 61 6e 79 20 6e 75 6d 62 65 72 0d 79 | to any number.y| 00000810 6f 75 20 68 61 70 70 65 6e 65 64 20 74 6f 20 74 |ou happened to t| 00000820 79 70 65 20 69 6e 2e 0d 0d 4d 61 72 6b 20 69 73 |ype in...Mark is| 00000830 20 47 4f 4f 44 20 54 6f 6d 20 69 73 20 42 41 44 | GOOD Tom is BAD| 00000840 2e 20 0d 0d 49 66 20 49 20 73 61 79 20 74 6f 20 |. ..If I say to | 00000850 79 6f 75 20 77 68 6f 20 69 73 20 47 4f 4f 44 20 |you who is GOOD | 00000860 79 6f 75 20 73 61 79 20 4d 61 72 6b 2e 20 45 71 |you say Mark. Eq| 00000870 75 61 6c 6c 79 20 77 68 6f 20 69 73 20 42 41 44 |ually who is BAD| 00000880 20 79 6f 75 20 73 61 79 20 54 6f 6d 0d 0d 47 4f | you say Tom..GO| 00000890 4f 44 20 61 6e 64 20 42 41 44 20 61 72 65 1a 20 |OD and BAD are. | 000008a0 76 61 72 69 61 62 6c 65 73 20 77 69 74 68 20 47 |variables with G| 000008b0 4f 4f 44 20 68 6f 6c 64 69 6e 67 20 74 68 65 20 |OOD holding the | 000008c0 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 72 6b |information Mark| 000008d0 20 0d 61 6e 64 20 42 41 44 20 68 6f 6c 64 69 6e | .and BAD holdin| 000008e0 67 20 74 68 65 20 69 6e 66 6f 72 6d 61 74 69 6f |g the informatio| 000008f0 6e 20 54 6f 6d 0d 0d 54 68 65 20 63 6f 6d 70 75 |n Tom..The compu| 00000900 74 65 72 20 69 6e 20 66 61 63 74 20 77 69 6c 6c |ter in fact will| 00000910 20 75 6e 64 65 72 73 74 61 6e 64 20 74 68 72 65 | understand thre| 00000920 65 20 74 79 70 65 73 20 6f 66 20 76 61 72 69 61 |e types of varia| 00000930 62 6c 65 73 2c 20 65 61 63 68 20 69 73 20 61 0d |bles, each is a.| 00000940 6c 69 74 74 6c 65 20 64 69 66 66 65 72 65 6e 74 |little different| 00000950 20 77 69 74 68 20 64 69 66 66 65 72 65 6e 74 20 | with different | 00000960 61 64 76 61 6e 74 61 67 65 73 20 61 6e 64 20 64 |advantages and d| 00000970 69 73 61 64 76 61 6e 74 61 67 65 73 20 61 6e 64 |isadvantages and| 00000980 20 65 61 63 68 0d 6e 65 65 64 73 20 74 6f 20 62 | each.needs to b| 00000990 65 20 68 61 6e 64 6c 65 64 20 69 6e 20 61 20 64 |e handled in a d| 000009a0 69 66 66 65 72 65 6e 74 20 77 61 79 2e 0d 0d 54 |ifferent way...T| 000009b0 68 65 20 76 61 72 69 61 62 6c 65 20 77 65 20 75 |he variable we u| 000009c0 73 65 64 20 61 62 6f 76 65 20 77 61 73 20 63 61 |sed above was ca| 000009d0 6c 6c 65 64 20 61 20 52 65 61 6c 20 76 61 72 69 |lled a Real vari| 000009e0 61 62 6c 65 2e 20 49 74 20 63 61 6e 20 69 6e 20 |able. It can in | 000009f0 66 61 63 74 0d 73 74 6f 72 65 20 6e 75 6d 62 65 |fact.store numbe| 00000a00 72 73 20 61 6e 64 20 64 65 63 69 6d 61 6c 20 66 |rs and decimal f| 00000a10 72 61 63 74 69 6f 6e 73 20 73 75 63 68 20 61 73 |ractions such as| 00000a20 20 33 2e 31 34 20 49 20 67 61 76 65 20 69 74 20 | 3.14 I gave it | 00000a30 74 68 65 20 6e 61 6d 65 20 41 20 62 75 74 0d 69 |the name A but.i| 00000a40 74 20 63 61 6e 20 69 6e 20 66 61 63 74 20 68 61 |t can in fact ha| 00000a50 76 65 20 61 6c 6d 6f 73 74 20 61 6e 79 20 6e 61 |ve almost any na| 00000a60 6d 65 2e 20 0d 0d 54 79 70 65 20 69 6e 3a 20 31 |me. ..Type in: 1| 00000a70 30 20 49 4e 50 55 54 20 41 0d 20 20 20 20 20 20 |0 INPUT A. | 00000a80 20 20 20 32 30 20 49 4e 50 55 54 20 42 0d 20 20 | 20 INPUT B. | 00000a90 20 20 20 20 20 20 20 33 30 20 43 3d 41 2b 42 0d | 30 C=A+B.| 00000aa0 20 20 20 20 20 20 20 20 20 34 30 20 50 52 49 4e | 40 PRIN| 00000ab0 54 20 43 0d 61 6e 64 20 52 55 4e 20 74 68 69 73 |T C.and RUN this| 00000ac0 20 70 72 6f 67 72 61 6d 2e 20 59 6f 75 20 77 69 | program. You wi| 00000ad0 6c 6c 20 73 65 65 20 61 20 3f 20 61 73 20 62 65 |ll see a ? as be| 00000ae0 66 6f 72 65 20 66 72 6f 6d 20 6c 69 6e 65 20 31 |fore from line 1| 00000af0 30 2c 20 65 6e 74 65 72 20 61 0d 6e 75 6d 62 65 |0, enter a.numbe| 00000b00 72 2c 20 74 72 79 20 61 20 64 65 63 69 6d 61 6c |r, try a decimal| 00000b10 20 6e 75 6d 62 65 72 20 73 75 63 68 20 61 73 20 | number such as | 00000b20 33 2e 31 34 2e 20 41 66 74 65 72 20 52 45 54 55 |3.14. After RETU| 00000b30 52 4e 20 61 6e 6f 74 68 65 72 20 3f 20 77 69 6c |RN another ? wil| 00000b40 6c 0d 61 70 70 65 61 72 20 74 68 69 73 20 74 69 |l.appear this ti| 00000b50 6d 65 20 66 72 6f 6d 20 6c 69 6e 65 20 32 30 20 |me from line 20 | 00000b60 61 6e 64 20 79 6f 75 20 63 61 6e 20 65 6e 74 65 |and you can ente| 00000b70 72 20 61 6e 6f 74 68 65 72 20 6e 75 6d 62 65 72 |r another number| 00000b80 2e 20 41 66 74 65 72 0d 70 72 65 73 73 69 6e 67 |. After.pressing| 00000b90 20 52 45 54 55 52 4e 20 74 68 65 20 63 6f 6d 70 | RETURN the comp| 00000ba0 75 74 65 72 20 77 69 6c 6c 20 61 64 64 20 74 68 |uter will add th| 00000bb0 65 73 65 20 74 77 6f 20 6e 75 6d 62 65 72 73 20 |ese two numbers | 00000bc0 74 6f 67 65 74 68 65 72 20 69 6e 20 6c 69 6e 65 |together in line| 00000bd0 0d 33 30 20 61 6e 64 20 70 72 69 6e 74 20 74 68 |.30 and print th| 00000be0 65 20 72 65 73 75 6c 74 20 69 6e 20 6c 69 6e 65 |e result in line| 00000bf0 20 34 30 2e 20 4e 6f 74 69 63 65 20 74 68 61 74 | 40. Notice that| 00000c00 20 69 6e 20 6c 69 6e 65 20 33 30 20 74 68 65 20 | in line 30 the | 00000c10 73 75 6d 20 69 73 0d 77 72 69 74 74 65 6e 20 77 |sum is.written w| 00000c20 69 74 68 20 74 68 65 20 72 65 73 75 6c 74 20 62 |ith the result b| 00000c30 65 66 6f 72 65 20 74 68 65 20 73 75 6d 20 69 74 |efore the sum it| 00000c40 73 65 6c 66 2e 20 57 68 61 74 20 6c 69 6e 65 20 |self. What line | 00000c50 33 30 20 69 73 20 73 61 79 69 6e 67 20 74 6f 0d |30 is saying to.| 00000c60 74 68 65 20 63 6f 6d 70 75 74 65 72 20 69 73 20 |the computer is | 00000c70 61 20 76 61 72 69 61 62 6c 65 20 63 61 6c 6c 65 |a variable calle| 00000c80 64 20 43 20 77 69 6c 6c 20 62 65 20 65 71 75 61 |d C will be equa| 00000c90 6c 20 74 6f 20 61 20 76 61 72 69 61 62 6c 65 20 |l to a variable | 00000ca0 63 61 6c 6c 65 64 20 41 0d 61 64 64 65 64 20 74 |called A.added t| 00000cb0 6f 20 20 61 20 76 61 72 69 61 62 6c 65 20 63 61 |o a variable ca| 00000cc0 6c 6c 65 64 20 42 2e 20 0d 0d 54 6f 20 73 75 62 |lled B. ..To sub| 00000cd0 74 72 61 63 74 20 41 20 66 72 6f 6d 20 42 20 79 |tract A from B y| 00000ce0 6f 75 20 77 6f 75 6c 64 20 75 73 65 20 2d 20 0d |ou would use - .| 00000cf0 54 6f 20 6d 75 6c 74 69 70 6c 79 20 41 20 77 69 |To multiply A wi| 00000d00 74 68 20 42 20 79 6f 75 20 77 6f 75 6c 64 20 75 |th B you would u| 00000d10 73 65 20 2a 0d 54 6f 20 20 64 69 76 69 64 65 20 |se *.To divide | 00000d20 20 41 20 20 62 79 20 20 42 20 79 6f 75 20 77 6f | A by B you wo| 00000d30 75 6c 64 20 75 73 65 20 2f 0d 0d 54 68 65 20 73 |uld use /..The s| 00000d40 79 6d 62 6f 6c 73 20 66 6f 72 20 6d 75 6c 74 69 |ymbols for multi| 00000d50 70 6c 79 20 61 6e 64 1a 20 64 69 76 69 64 65 1a |ply and. divide.| 00000d60 20 75 73 65 64 1a 20 62 79 1a 20 74 68 65 20 63 | used. by. the c| 00000d70 6f 6d 70 75 74 65 72 20 61 72 65 20 64 69 66 66 |omputer are diff| 00000d80 65 72 65 6e 74 0d 66 72 6f 6d 20 74 68 6f 73 65 |erent.from those| 00000d90 20 75 73 65 64 20 62 79 20 75 73 20 6f 6e 20 70 | used by us on p| 00000da0 61 70 65 72 2e 0d 0d 41 6e 6f 74 68 65 72 20 76 |aper...Another v| 00000db0 61 72 69 61 62 6c 65 20 69 73 20 63 61 6c 6c 65 |ariable is calle| 00000dc0 64 20 61 6e 20 69 6e 74 65 67 65 72 20 76 61 72 |d an integer var| 00000dd0 69 61 62 6c 65 2e 20 41 6e 20 69 6e 74 65 67 65 |iable. An intege| 00000de0 72 20 69 73 20 61 20 77 68 6f 6c 65 0d 6e 75 6d |r is a whole.num| 00000df0 62 65 72 2c 20 74 68 61 74 20 69 73 20 6f 6e 65 |ber, that is one| 00000e00 20 77 68 69 63 68 20 64 6f 65 73 20 6e 6f 74 20 | which does not | 00000e10 69 6e 63 6c 75 64 65 20 61 6e 79 20 66 72 61 63 |include any frac| 00000e20 74 69 6f 6e 73 2e 20 35 20 69 73 20 61 6e 20 69 |tions. 5 is an i| 00000e30 6e 74 65 67 65 72 2c 0d 35 2e 32 35 20 61 6e 64 |nteger,.5.25 and| 00000e40 20 35 20 31 2f 32 20 61 72 65 20 6e 6f 74 20 62 | 5 1/2 are not b| 00000e50 65 63 61 75 73 65 20 74 68 65 79 20 69 6e 63 6c |ecause they incl| 00000e60 75 64 65 20 66 72 61 63 74 69 6f 6e 73 2e 0d 0d |ude fractions...| 00000e70 41 6e 20 69 6e 74 65 67 65 72 20 69 73 20 69 6e |An integer is in| 00000e80 64 69 63 61 74 65 64 20 62 79 20 61 20 25 20 73 |dicated by a % s| 00000e90 69 67 6e 20 61 66 74 65 72 20 74 68 65 20 76 61 |ign after the va| 00000ea0 72 69 61 62 6c 65 20 6e 61 6d 65 2e 20 49 6e 20 |riable name. In | 00000eb0 63 6f 6d 6f 6e 0d 73 70 65 61 63 68 20 74 68 69 |comon.speach thi| 00000ec0 73 20 73 69 67 6e 20 69 73 20 63 61 6c 6c 65 64 |s sign is called| 00000ed0 20 70 65 72 63 65 6e 74 20 73 6f 20 41 25 20 69 | percent so A% i| 00000ee0 73 2e 2e 2e 41 20 20 70 65 72 63 65 6e 74 2e 0d |s...A percent..| 00000ef0 0d 49 6e 20 66 61 63 74 20 69 66 20 79 6f 75 20 |.In fact if you | 00000f00 77 72 6f 74 65 20 74 68 65 20 6c 61 73 74 20 70 |wrote the last p| 00000f10 72 6f 67 72 61 6d 20 75 73 69 6e 67 20 69 6e 74 |rogram using int| 00000f20 65 72 67 65 72 20 76 61 72 69 61 62 6c 65 73 20 |erger variables | 00000f30 69 6e 73 74 65 61 64 20 61 6e 64 0d 65 6e 74 65 |instead and.ente| 00000f40 72 65 64 20 73 61 79 20 33 2e 31 34 20 69 74 20 |red say 3.14 it | 00000f50 77 6f 75 6c 64 20 62 65 20 74 72 65 61 74 65 64 |would be treated| 00000f60 20 61 73 20 33 20 77 69 74 68 20 74 68 65 20 2e | as 3 with the .| 00000f70 31 34 20 62 65 69 6e 67 20 69 67 6e 6f 72 65 64 |14 being ignored| 00000f80 2e 0d 0d 49 6e 74 65 67 65 72 20 76 61 72 69 61 |...Integer varia| 00000f90 62 6c 65 73 20 61 72 65 20 70 72 6f 63 65 73 73 |bles are process| 00000fa0 65 64 20 62 79 20 74 68 65 20 63 6f 6d 70 75 74 |ed by the comput| 00000fb0 65 72 20 6d 6f 72 65 20 71 75 69 63 6b 6c 79 20 |er more quickly | 00000fc0 74 68 61 6e 20 72 65 61 6c 0d 76 61 72 69 61 62 |than real.variab| 00000fd0 6c 65 73 2c 20 74 68 65 79 20 63 61 6e 20 69 6e |les, they can in| 00000fe0 20 73 6f 6d 65 20 63 69 72 63 75 6d 73 74 61 6e | some circumstan| 00000ff0 63 65 73 20 62 65 20 6d 6f 72 65 20 61 63 63 75 |ces be more accu| 00001000 72 61 74 65 20 61 6e 64 20 70 65 72 68 61 70 73 |rate and perhaps| 00001010 0d 6d 6f 72 65 20 69 6d 70 6f 72 74 61 6e 74 6c |.more importantl| 00001020 79 20 69 6e 74 65 67 65 72 20 76 61 72 69 61 62 |y integer variab| 00001030 6c 65 73 20 62 65 67 69 6e 69 6e 67 20 77 69 74 |les begining wit| 00001040 68 20 61 20 63 61 70 69 74 61 6c 20 6c 65 74 74 |h a capital lett| 00001050 65 72 20 6f 66 20 74 68 65 0d 61 6c 70 68 61 62 |er of the.alphab| 00001060 65 74 20 73 75 63 68 20 61 73 20 41 25 20 2c 20 |et such as A% , | 00001070 42 25 20 2c 20 43 25 20 61 6e 64 20 73 6f 20 6f |B% , C% and so o| 00001080 6e 20 61 72 65 20 6e 6f 74 20 63 6c 65 61 72 65 |n are not cleare| 00001090 64 20 77 68 65 6e 20 61 20 6e 65 77 20 70 72 6f |d when a new pro| 000010a0 67 72 61 6d 0d 69 73 20 72 75 6e 20 6f 72 20 65 |gram.is run or e| 000010b0 76 65 6e 20 61 66 74 65 72 20 70 72 65 73 73 69 |ven after pressi| 000010c0 6e 67 20 42 52 45 41 4b 2e 20 54 6f 20 6d 61 72 |ng BREAK. To mar| 000010d0 6b 20 74 68 69 73 20 73 70 65 63 69 61 6c 20 73 |k this special s| 000010e0 74 61 74 75 73 20 74 68 65 73 65 0d 70 61 72 74 |tatus these.part| 000010f0 69 63 75 6c 61 72 20 69 6e 74 65 72 67 65 72 20 |icular interger | 00001100 76 61 72 69 61 62 6c 65 73 20 61 72 65 20 63 61 |variables are ca| 00001110 6c 6c 65 64 20 52 65 73 69 64 65 6e 74 20 49 6e |lled Resident In| 00001120 74 65 67 65 72 20 56 61 72 69 61 62 6c 65 73 2e |teger Variables.| 00001130 20 54 68 69 73 0d 6d 61 6b 65 73 20 74 68 65 6e | This.makes then| 00001140 20 65 73 70 65 63 69 61 6c 6c 79 20 75 73 65 66 | especially usef| 00001150 75 6c 20 77 68 65 6e 20 73 65 76 65 61 6c 20 70 |ul when seveal p| 00001160 72 6f 67 72 61 6d 20 6e 65 65 64 20 74 6f 20 62 |rogram need to b| 00001170 65 20 6c 6f 61 64 65 64 20 6f 6e 65 0d 61 66 74 |e loaded one.aft| 00001180 65 72 20 61 6e 6f 74 68 65 72 20 61 6e 64 20 6e |er another and n| 00001190 75 6d 62 65 72 73 20 6e 65 65 64 20 74 6f 20 62 |umbers need to b| 000011a0 65 20 70 61 73 73 65 64 20 66 72 6f 6d 20 6f 6e |e passed from on| 000011b0 65 20 70 72 6f 67 72 61 6d 20 74 6f 20 74 68 65 |e program to the| 000011c0 20 6e 65 78 74 2e 0d 0d 53 6f 20 6d 75 63 68 20 | next...So much | 000011d0 66 6f 72 20 69 6e 74 65 67 65 72 20 76 61 72 69 |for integer vari| 000011e0 61 62 6c 65 73 2e 0d 0d 4e 6f 77 20 74 68 65 20 |ables...Now the | 000011f0 6c 61 73 74 20 74 79 70 65 20 6f 66 20 76 61 72 |last type of var| 00001200 69 61 62 6c 65 20 69 73 20 63 61 6c 6c 65 64 20 |iable is called | 00001210 61 20 73 74 72 69 6e 67 20 76 61 72 69 61 62 6c |a string variabl| 00001220 65 2e 20 49 74 20 77 69 6c 6c 20 68 6f 6c 64 20 |e. It will hold | 00001230 61 0d 73 74 72 69 6e 67 20 6f 66 20 6c 65 74 74 |a.string of lett| 00001240 65 72 73 20 6f 72 20 61 20 73 69 6e 67 6c 65 20 |ers or a single | 00001250 6c 65 74 74 65 72 2e 20 49 73 20 69 73 20 73 69 |letter. Is is si| 00001260 67 6e 69 66 69 65 64 20 62 79 20 74 68 65 20 73 |gnified by the s| 00001270 79 6d 62 6f 6c 20 24 0d 61 66 74 65 72 20 74 68 |ymbol $.after th| 00001280 65 20 76 61 72 69 61 62 6c 65 20 6e 61 6d 65 20 |e variable name | 00001290 69 65 20 41 24 2e 20 49 6e 20 74 68 69 73 20 63 |ie A$. In this c| 000012a0 61 73 65 20 77 65 20 77 6f 75 6c 64 20 73 61 79 |ase we would say| 000012b0 20 41 20 64 6f 6c 6c 61 72 2e 0d 0d 41 20 73 74 | A dollar...A st| 000012c0 72 69 6e 67 20 76 61 72 69 61 62 6c 65 20 64 6f |ring variable do| 000012d0 65 73 6e 27 74 20 61 63 74 75 61 6c 6c 79 20 64 |esn't actually d| 000012e0 6f 20 61 6e 79 74 68 69 6e 67 20 6d 61 74 68 65 |o anything mathe| 000012f0 6d 61 74 69 63 61 6c 20 69 74 20 73 69 6d 70 6c |matical it simpl| 00001300 79 0d 73 74 6f 72 65 73 20 77 68 61 74 20 69 74 |y.stores what it| 00001310 20 69 73 20 74 6f 6c 64 20 61 6e 64 20 74 68 65 | is told and the| 00001320 6e 20 64 65 6c 69 76 65 72 73 20 69 74 20 77 68 |n delivers it wh| 00001330 65 6e 20 69 74 20 69 73 20 74 6f 6c 64 2e 0d 0d |en it is told...| 00001340 49 66 20 79 6f 75 20 74 79 70 65 20 69 6e 20 74 |If you type in t| 00001350 68 65 20 6c 61 73 74 20 70 72 6f 67 72 61 6d 20 |he last program | 00001360 61 67 61 69 6e 20 74 68 69 73 20 74 69 6d 65 20 |again this time | 00001370 6d 61 6b 69 6e 67 20 65 61 63 68 20 76 61 72 69 |making each vari| 00001380 61 62 6c 65 20 61 0d 73 74 72 69 6e 67 20 76 61 |able a.string va| 00001390 72 69 61 62 6c 65 20 74 68 65 20 72 65 73 75 6c |riable the resul| 000013a0 74 20 77 69 6c 6c 20 62 65 20 65 61 63 68 20 6f |t will be each o| 000013b0 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 |f the characters| 000013c0 20 79 6f 75 20 74 79 70 65 64 20 69 6e 0d 62 65 | you typed in.be| 000013d0 69 6e 67 20 70 72 69 6e 74 65 64 20 6f 6e 20 74 |ing printed on t| 000013e0 68 65 20 73 63 72 65 65 6e 2e 20 49 66 20 79 6f |he screen. If yo| 000013f0 75 20 65 6e 74 65 72 20 32 20 74 68 65 6e 20 33 |u enter 2 then 3| 00001400 20 74 68 65 20 72 65 73 75 6c 74 20 77 69 6c 6c | the result will| 00001410 20 62 65 20 32 33 2e 0d 49 66 20 79 6f 75 20 65 | be 23..If you e| 00001420 6e 74 65 72 20 46 52 20 74 68 65 6e 20 45 44 20 |nter FR then ED | 00001430 74 68 65 20 72 65 73 75 6c 74 20 77 69 6c 6c 20 |the result will | 00001440 62 65 20 46 52 45 44 2e 20 0d 0d 4e 6f 77 20 74 |be FRED. ..Now t| 00001450 68 65 72 65 20 69 73 20 61 6e 6f 74 68 65 72 20 |here is another | 00001460 77 6f 72 64 20 77 68 69 63 68 20 68 61 73 20 62 |word which has b| 00001470 65 65 6e 20 75 73 65 64 20 63 61 6c 6c 65 64 20 |een used called | 00001480 49 4e 50 55 54 2e 20 54 68 69 73 20 77 6f 72 64 |INPUT. This word| 00001490 0d 73 74 6f 70 73 20 61 20 70 72 6f 67 72 61 6d |.stops a program| 000014a0 20 61 6e 64 20 77 61 69 74 20 66 6f 72 20 69 6e | and wait for in| 000014b0 66 6f 72 6d 61 74 69 6f 6e 20 74 6f 20 62 65 20 |formation to be | 000014c0 74 79 70 65 64 20 69 6e 2e 20 54 68 65 20 69 6e |typed in. The in| 000014d0 66 6f 72 6d 61 74 69 6f 6e 0d 63 61 6e 20 62 65 |formation.can be| 000014e0 20 61 6c 6d 6f 73 74 20 61 6e 79 20 6c 65 6e 67 | almost any leng| 000014f0 74 68 20 66 72 6f 6d 20 6e 6f 74 68 69 6e 67 20 |th from nothing | 00001500 74 6f 20 32 35 35 20 63 68 61 72 61 63 74 65 72 |to 255 character| 00001510 73 20 61 6e 64 20 6f 6e 63 65 20 74 68 65 0d 69 |s and once the.i| 00001520 6e 66 6f 72 6d 61 74 69 6f 6e 20 68 61 73 20 62 |nformation has b| 00001530 65 65 6e 20 74 79 70 65 20 69 6e 20 74 68 65 20 |een type in the | 00001540 52 45 54 55 52 4e 20 6b 65 79 20 6d 75 73 74 20 |RETURN key must | 00001550 62 65 20 70 72 65 73 73 65 64 2e 0d 0d 49 4e 50 |be pressed...INP| 00001560 55 54 20 6d 75 73 74 20 62 65 20 66 6f 6c 6c 6f |UT must be follo| 00001570 77 65 64 20 62 79 20 61 20 76 61 72 69 61 62 6c |wed by a variabl| 00001580 65 20 6e 61 6d 65 20 73 6f 20 74 68 61 74 20 77 |e name so that w| 00001590 68 61 74 65 76 65 72 20 69 73 20 74 79 70 65 64 |hatever is typed| 000015a0 20 69 6e 20 63 61 6e 0d 62 65 20 70 75 74 20 73 | in can.be put s| 000015b0 6f 6d 65 77 68 65 72 65 20 74 6f 20 62 65 20 64 |omewhere to be d| 000015c0 65 61 6c 74 20 77 69 74 68 20 6c 61 74 65 72 2e |ealt with later.| 000015d0 0d 0d 41 6e 6f 74 68 65 72 20 77 6f 72 64 20 66 |..Another word f| 000015e0 6f 72 20 67 65 74 74 69 6e 67 20 61 20 70 72 6f |or getting a pro| 000015f0 67 72 61 6d 20 74 6f 20 61 73 6b 20 66 6f 72 20 |gram to ask for | 00001600 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 69 73 20 47 |information is G| 00001610 45 54 2e 0d 0d 54 68 69 73 20 69 73 20 61 20 70 |ET...This is a p| 00001620 61 72 74 69 63 75 6c 61 72 6c 79 20 65 61 73 79 |articularly easy| 00001630 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 75 73 65 | function to use| 00001640 2e 20 49 74 20 63 6f 6d 65 73 20 69 6e 20 74 77 |. It comes in tw| 00001650 6f 20 66 6f 72 6d 73 20 0d 47 45 54 20 61 6e 64 |o forms .GET and| 00001660 20 47 45 54 24 0d 0d 31 30 20 41 3d 47 45 54 0d | GET$..10 A=GET.| 00001670 32 30 20 50 52 49 4e 54 20 41 0d 0d 57 68 65 6e |20 PRINT A..When| 00001680 20 74 68 69 73 20 70 72 6f 67 72 61 6d 20 69 73 | this program is| 00001690 20 52 55 4e 20 74 68 65 20 63 6f 6d 70 75 74 65 | RUN the compute| 000016a0 72 20 77 69 6c 6c 20 77 61 69 74 20 66 6f 72 20 |r will wait for | 000016b0 61 20 6b 65 79 20 74 6f 20 62 65 20 70 72 65 73 |a key to be pres| 000016c0 73 65 64 0d 54 68 65 20 41 53 43 49 49 20 63 6f |sed.The ASCII co| 000016d0 64 65 20 66 6f 72 20 74 68 61 74 20 6b 65 79 20 |de for that key | 000016e0 69 73 20 70 75 74 20 69 6e 74 6f 20 74 68 65 20 |is put into the | 000016f0 76 61 72 69 61 62 6c 65 20 41 20 61 6e 64 20 69 |variable A and i| 00001700 6e 20 6c 69 6e 65 20 32 30 20 41 20 69 73 0d 70 |n line 20 A is.p| 00001710 72 69 6e 74 65 64 2e 20 28 44 6f 20 79 6f 75 20 |rinted. (Do you | 00001720 6b 6e 6f 77 20 77 68 61 74 20 41 53 43 49 49 20 |know what ASCII | 00001730 63 6f 64 65 73 20 61 72 65 3f 29 0d 0d 4e 6f 77 |codes are?)..Now| 00001740 20 74 68 69 73 20 69 73 20 61 20 76 65 72 79 20 | this is a very | 00001750 75 73 65 66 75 6c 20 6c 69 74 74 6c 65 20 77 6f |useful little wo| 00001760 72 64 2e 20 53 75 70 70 6f 73 65 20 74 68 65 72 |rd. Suppose ther| 00001770 65 27 73 20 61 20 6c 69 73 74 20 6f 66 20 6f 70 |e's a list of op| 00001780 74 69 6f 6e 73 0d 66 6f 72 20 74 68 65 20 63 6f |tions.for the co| 00001790 6d 70 75 74 65 72 20 74 6f 20 63 68 6f 73 65 20 |mputer to chose | 000017a0 66 72 6f 6d 3a 20 31 2c 20 61 73 6b 20 66 6f 72 |from: 1, ask for| 000017b0 20 74 77 6f 20 6e 75 6d 62 65 72 73 20 61 6e 64 | two numbers and| 000017c0 20 61 64 64 20 74 68 65 6d 0d 74 6f 67 65 74 68 | add them.togeth| 000017d0 65 72 2c 20 32 2c 20 61 73 6b 20 66 6f 72 20 74 |er, 2, ask for t| 000017e0 77 6f 20 6e 75 6d 62 65 72 20 61 6e 64 20 73 75 |wo number and su| 000017f0 62 74 72 61 63 74 20 74 68 65 20 73 65 63 6f 6e |btract the secon| 00001800 64 20 66 72 6f 6d 20 74 68 65 20 66 69 72 73 74 |d from the first| 00001810 2c 20 33 2c 0d 61 73 6b 20 66 6f 72 20 74 77 6f |, 3,.ask for two| 00001820 20 6e 75 6d 62 65 72 73 20 61 6e 64 20 6d 75 6c | numbers and mul| 00001830 74 69 70 6c 79 20 74 68 65 6d 2c 20 34 2c 20 61 |tiply them, 4, a| 00001840 73 6b 20 66 6f 72 20 74 77 6f 20 6e 75 6d 62 65 |sk for two numbe| 00001850 72 73 20 61 6e 64 20 64 69 76 69 64 65 0d 74 68 |rs and divide.th| 00001860 65 20 66 69 72 73 74 20 62 79 20 74 68 65 20 73 |e first by the s| 00001870 65 63 6f 6e 64 2e 20 41 20 73 69 6d 70 6c 65 20 |econd. A simple | 00001880 61 72 69 74 68 6d 65 74 69 63 20 70 72 6f 67 72 |arithmetic progr| 00001890 61 6d 2e 0d 0d |am...| 00001895