Home » Archimedes archive » Acorn User » AU 1994-05.adf » !BasicProg_BasicProg » Listing1
Listing1
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 » Archimedes archive » Acorn User » AU 1994-05.adf » !BasicProg_BasicProg |
Filename: | Listing1 |
Read OK: | ✔ |
File size: | 0273 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1 REM >Listing 1 2 REM Here, we test knowledge of the symbols for elements. 3 : 4 score% = 0 : total% = 0 5 READ element$, symbol$ 6 WHILE element$<>"End" 7 PRINT "What is the chemical symbol for ";element$;"?"; 8 INPUT " "answer$ 9 IF answer$ <> symbol$ THEN 10 PRINT "Wrong, it is ";symbol$;"."' 11 ELSE 12 PRINT "Correct."' 13 score% = score% + 1 14 ENDIF 15 total% = total% + 1 16 READ element$, symbol$ 17 ENDWHILE 18 PRINT "You scored ";score%;" out of ";total%;"." 19 DATA Hydrogen, H, Oxygen, O, Sulphur, S 20 DATA Calcium, Ca, Aluminium, Al, Magnesium 21 DATA Mg, Copper, Cu, Zinc, Zn, Lead, Pb 22 DATA Tungsten, W, End, E 23 END 24
� >Listing 1 ; � Here, we test knowledge of the symbols for elements. : score% = 0 : total% = 0 � element$, symbol$ ȕ element$<>"End" 8 � "What is the chemical symbol for ";element$;"?"; � " "answer$ � answer$ <> symbol$ � & � "Wrong, it is ";symbol$;"."' � � "Correct."' score% = score% + 1 � total% = total% + 1 � element$, symbol$ � 1 � "You scored ";score%;" out of ";total%;"." ) � Hydrogen, H, Oxygen, O, Sulphur, S , � Calcium, Ca, Aluminium, Al, Magnesium ) � Mg, Copper, Cu, Zinc, Zn, Lead, Pb � Tungsten, W, End, E � �
00000000 0d 00 01 12 20 f4 20 20 3e 4c 69 73 74 69 6e 67 |.... . >Listing| 00000010 20 31 0d 00 02 3b 20 f4 20 48 65 72 65 2c 20 77 | 1...; . Here, w| 00000020 65 20 74 65 73 74 20 6b 6e 6f 77 6c 65 64 67 65 |e test knowledge| 00000030 20 6f 66 20 74 68 65 20 73 79 6d 62 6f 6c 73 20 | of the symbols | 00000040 66 6f 72 20 65 6c 65 6d 65 6e 74 73 2e 0d 00 03 |for elements....| 00000050 06 20 3a 0d 00 04 1c 20 73 63 6f 72 65 25 20 3d |. :.... score% =| 00000060 20 30 20 3a 20 74 6f 74 61 6c 25 20 3d 20 30 0d | 0 : total% = 0.| 00000070 00 05 18 20 f3 20 65 6c 65 6d 65 6e 74 24 2c 20 |... . element$, | 00000080 73 79 6d 62 6f 6c 24 0d 00 06 17 20 c8 95 20 65 |symbol$.... .. e| 00000090 6c 65 6d 65 6e 74 24 3c 3e 22 45 6e 64 22 0d 00 |lement$<>"End"..| 000000a0 07 38 20 20 f1 20 22 57 68 61 74 20 69 73 20 74 |.8 . "What is t| 000000b0 68 65 20 63 68 65 6d 69 63 61 6c 20 73 79 6d 62 |he chemical symb| 000000c0 6f 6c 20 66 6f 72 20 22 3b 65 6c 65 6d 65 6e 74 |ol for ";element| 000000d0 24 3b 22 3f 22 3b 0d 00 08 12 20 20 e8 20 22 20 |$;"?";.... . " | 000000e0 22 61 6e 73 77 65 72 24 0d 00 09 1c 20 20 e7 20 |"answer$.... . | 000000f0 61 6e 73 77 65 72 24 20 3c 3e 20 73 79 6d 62 6f |answer$ <> symbo| 00000100 6c 24 20 8c 0d 00 0a 26 20 20 20 20 f1 20 22 57 |l$ ....& . "W| 00000110 72 6f 6e 67 2c 20 69 74 20 69 73 20 22 3b 73 79 |rong, it is ";sy| 00000120 6d 62 6f 6c 24 3b 22 2e 22 27 0d 00 0b 07 20 20 |mbol$;"."'.... | 00000130 cc 0d 00 0c 14 20 20 20 f1 20 22 43 6f 72 72 65 |..... . "Corre| 00000140 63 74 2e 22 27 0d 00 0d 1a 20 20 20 73 63 6f 72 |ct."'.... scor| 00000150 65 25 20 3d 20 73 63 6f 72 65 25 20 2b 20 31 0d |e% = score% + 1.| 00000160 00 0e 07 20 20 cd 0d 00 0f 19 20 20 74 6f 74 61 |... ..... tota| 00000170 6c 25 20 3d 20 74 6f 74 61 6c 25 20 2b 20 31 0d |l% = total% + 1.| 00000180 00 10 19 20 20 f3 20 65 6c 65 6d 65 6e 74 24 2c |... . element$,| 00000190 20 73 79 6d 62 6f 6c 24 0d 00 11 06 20 ce 0d 00 | symbol$.... ...| 000001a0 12 31 20 f1 20 22 59 6f 75 20 73 63 6f 72 65 64 |.1 . "You scored| 000001b0 20 22 3b 73 63 6f 72 65 25 3b 22 20 6f 75 74 20 | ";score%;" out | 000001c0 6f 66 20 22 3b 74 6f 74 61 6c 25 3b 22 2e 22 0d |of ";total%;".".| 000001d0 00 13 29 20 dc 20 48 79 64 72 6f 67 65 6e 2c 20 |..) . Hydrogen, | 000001e0 48 2c 20 4f 78 79 67 65 6e 2c 20 4f 2c 20 53 75 |H, Oxygen, O, Su| 000001f0 6c 70 68 75 72 2c 20 53 0d 00 14 2c 20 dc 20 43 |lphur, S..., . C| 00000200 61 6c 63 69 75 6d 2c 20 43 61 2c 20 41 6c 75 6d |alcium, Ca, Alum| 00000210 69 6e 69 75 6d 2c 20 41 6c 2c 20 4d 61 67 6e 65 |inium, Al, Magne| 00000220 73 69 75 6d 0d 00 15 29 20 dc 20 4d 67 2c 20 43 |sium...) . Mg, C| 00000230 6f 70 70 65 72 2c 20 43 75 2c 20 5a 69 6e 63 2c |opper, Cu, Zinc,| 00000240 20 5a 6e 2c 20 4c 65 61 64 2c 20 50 62 0d 00 16 | Zn, Lead, Pb...| 00000250 1a 20 dc 20 54 75 6e 67 73 74 65 6e 2c 20 57 2c |. . Tungsten, W,| 00000260 20 45 6e 64 2c 20 45 0d 00 17 06 20 e0 0d 00 18 | End, E.... ....| 00000270 04 0d ff |...| 00000273