Home » Archimedes archive » Acorn User » AU 1994-05.adf » !BasicProg_BasicProg » Listing2
Listing2
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: | Listing2 |
Read OK: | ✔ |
File size: | 04AA bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10 REM >Listing 2 20 REM Here, we test other areas of the Periodic Table. 25 : 30 score% = 0 : total% = 0 40 PRINT "Do you want to be tested upon:" 50 PRINT "1 - Element atomic numbers" 60 PRINT "2 - Facts about certain elements" 65 REPEAT 70 INPUT choice% 71 UNTIL choice%=1 OR choice%=2 72 IF choice%=1 RESTORE 1000 ELSE RESTORE 2000 73 READ ask$, end$ 80 READ question$, element$, symbol$ 90 WHILE question$<>end$ 100 PRINT ask$;question$;"?"; 110 INPUT " "answer$ 120 IF answer$ <> symbol$ AND answer$ <> element$ THEN 130 PRINT "Wrong, it is ";element$;", ";symbol$;"."' 140 ELSE 150 PRINT "Correct."' 160 score% = score% + 1 170 ENDIF 180 total% = total% + 1 190 READ question$, element$, symbol$ 200 ENDWHILE 210 PRINT "You scored ";score%;" out of ";total%;"." 220 END 1000 DATA "Which element has the atomic number ", 0 1010 DATA 1, Hydrogen, H, 2, Helium, He, 8, Oxygen, O 1020 DATA 10, Neon, Ne, 92, Uranium, U 1030 DATA 0, Nothing, Nil 2000 DATA "Which element ", "End of test" 2010 DATA "makes up 78% of air", Nitrogen, N 2020 DATA "is a brown liquid at room temperature", Bromine, Br 2030 DATA "has an oxide known as sapphire", Aluminium, Al 2040 DATA "was discovered by Joseph Priestly", Oxygen, O 2050 DATA "has forms called diamond and graphite", Carbon, C 2060 DATA "End of test", is, here
� >Listing 2 7 � Here, we test other areas of the Periodic Table. : score% = 0 : total% = 0 (' � "Do you want to be tested upon:" 2# � "1 - Element atomic numbers" <) � "2 - Facts about certain elements" A � F � choice% G � choice%=1 � choice%=2 H � choice%=1 � �dhC � � �dPG I � ask$, end$ P# � question$, element$, symbol$ Z ȕ question$<>end$ d � ask$;question$;"?"; n � " "answer$ x2 � answer$ <> symbol$ � answer$ <> element$ � �4 � "Wrong, it is ";element$;", ";symbol$;"."' � � � � "Correct."' � score% = score% + 1 � � � total% = total% + 1 �$ � question$, element$, symbol$ � � �1 � "You scored ";score%;" out of ";total%;"." � � �0 � "Which element has the atomic number ", 0 �2 � 1, Hydrogen, H, 2, Helium, He, 8, Oxygen, O �# � 10, Neon, Ne, 92, Uranium, U � 0, Nothing, Nil �& � "Which element ", "End of test" �) � "makes up 78% of air", Nitrogen, N �; � "is a brown liquid at room temperature", Bromine, Br �6 � "has an oxide known as sapphire", Aluminium, Al �5 � "was discovered by Joseph Priestly", Oxygen, O 9 � "has forms called diamond and graphite", Carbon, C � "End of test", is, here �
00000000 0d 00 0a 11 20 f4 20 3e 4c 69 73 74 69 6e 67 20 |.... . >Listing | 00000010 32 0d 00 14 37 20 f4 20 48 65 72 65 2c 20 77 65 |2...7 . Here, we| 00000020 20 74 65 73 74 20 6f 74 68 65 72 20 61 72 65 61 | test other area| 00000030 73 20 6f 66 20 74 68 65 20 50 65 72 69 6f 64 69 |s of the Periodi| 00000040 63 20 54 61 62 6c 65 2e 0d 00 19 06 20 3a 0d 00 |c Table..... :..| 00000050 1e 1c 20 73 63 6f 72 65 25 20 3d 20 30 20 3a 20 |.. score% = 0 : | 00000060 74 6f 74 61 6c 25 20 3d 20 30 0d 00 28 27 20 f1 |total% = 0..(' .| 00000070 20 22 44 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f | "Do you want to| 00000080 20 62 65 20 74 65 73 74 65 64 20 75 70 6f 6e 3a | be tested upon:| 00000090 22 0d 00 32 23 20 f1 20 22 31 20 2d 20 45 6c 65 |"..2# . "1 - Ele| 000000a0 6d 65 6e 74 20 61 74 6f 6d 69 63 20 6e 75 6d 62 |ment atomic numb| 000000b0 65 72 73 22 0d 00 3c 29 20 f1 20 22 32 20 2d 20 |ers"..<) . "2 - | 000000c0 46 61 63 74 73 20 61 62 6f 75 74 20 63 65 72 74 |Facts about cert| 000000d0 61 69 6e 20 65 6c 65 6d 65 6e 74 73 22 0d 00 41 |ain elements"..A| 000000e0 06 20 f5 0d 00 46 0e 20 e8 20 63 68 6f 69 63 65 |. ...F. . choice| 000000f0 25 0d 00 47 1c 20 fd 20 63 68 6f 69 63 65 25 3d |%..G. . choice%=| 00000100 31 20 84 20 63 68 6f 69 63 65 25 3d 32 0d 00 48 |1 . choice%=2..H| 00000110 20 20 e7 20 63 68 6f 69 63 65 25 3d 31 20 f7 20 | . choice%=1 . | 00000120 8d 64 68 43 20 8b 20 f7 20 8d 64 50 47 0d 00 49 |.dhC . . .dPG..I| 00000130 11 20 f3 20 61 73 6b 24 2c 20 65 6e 64 24 0d 00 |. . ask$, end$..| 00000140 50 23 20 f3 20 71 75 65 73 74 69 6f 6e 24 2c 20 |P# . question$, | 00000150 65 6c 65 6d 65 6e 74 24 2c 20 73 79 6d 62 6f 6c |element$, symbol| 00000160 24 0d 00 5a 17 20 c8 95 20 71 75 65 73 74 69 6f |$..Z. .. questio| 00000170 6e 24 3c 3e 65 6e 64 24 0d 00 64 1b 20 20 f1 20 |n$<>end$..d. . | 00000180 61 73 6b 24 3b 71 75 65 73 74 69 6f 6e 24 3b 22 |ask$;question$;"| 00000190 3f 22 3b 0d 00 6e 12 20 20 e8 20 22 20 22 61 6e |?";..n. . " "an| 000001a0 73 77 65 72 24 0d 00 78 32 20 20 e7 20 61 6e 73 |swer$..x2 . ans| 000001b0 77 65 72 24 20 3c 3e 20 73 79 6d 62 6f 6c 24 20 |wer$ <> symbol$ | 000001c0 80 20 61 6e 73 77 65 72 24 20 3c 3e 20 65 6c 65 |. answer$ <> ele| 000001d0 6d 65 6e 74 24 20 8c 0d 00 82 34 20 20 20 20 f1 |ment$ ....4 .| 000001e0 20 22 57 72 6f 6e 67 2c 20 69 74 20 69 73 20 22 | "Wrong, it is "| 000001f0 3b 65 6c 65 6d 65 6e 74 24 3b 22 2c 20 22 3b 73 |;element$;", ";s| 00000200 79 6d 62 6f 6c 24 3b 22 2e 22 27 0d 00 8c 07 20 |ymbol$;"."'.... | 00000210 20 cc 0d 00 96 14 20 20 20 f1 20 22 43 6f 72 72 | ..... . "Corr| 00000220 65 63 74 2e 22 27 0d 00 a0 1a 20 20 20 73 63 6f |ect."'.... sco| 00000230 72 65 25 20 3d 20 73 63 6f 72 65 25 20 2b 20 31 |re% = score% + 1| 00000240 0d 00 aa 07 20 20 cd 0d 00 b4 19 20 20 74 6f 74 |.... ..... tot| 00000250 61 6c 25 20 3d 20 74 6f 74 61 6c 25 20 2b 20 31 |al% = total% + 1| 00000260 0d 00 be 24 20 20 f3 20 71 75 65 73 74 69 6f 6e |...$ . question| 00000270 24 2c 20 65 6c 65 6d 65 6e 74 24 2c 20 73 79 6d |$, element$, sym| 00000280 62 6f 6c 24 0d 00 c8 06 20 ce 0d 00 d2 31 20 f1 |bol$.... ....1 .| 00000290 20 22 59 6f 75 20 73 63 6f 72 65 64 20 22 3b 73 | "You scored ";s| 000002a0 63 6f 72 65 25 3b 22 20 6f 75 74 20 6f 66 20 22 |core%;" out of "| 000002b0 3b 74 6f 74 61 6c 25 3b 22 2e 22 0d 00 dc 06 20 |;total%;".".... | 000002c0 e0 0d 03 e8 30 20 dc 20 22 57 68 69 63 68 20 65 |....0 . "Which e| 000002d0 6c 65 6d 65 6e 74 20 68 61 73 20 74 68 65 20 61 |lement has the a| 000002e0 74 6f 6d 69 63 20 6e 75 6d 62 65 72 20 22 2c 20 |tomic number ", | 000002f0 30 0d 03 f2 32 20 dc 20 31 2c 20 48 79 64 72 6f |0...2 . 1, Hydro| 00000300 67 65 6e 2c 20 48 2c 20 32 2c 20 48 65 6c 69 75 |gen, H, 2, Heliu| 00000310 6d 2c 20 48 65 2c 20 38 2c 20 4f 78 79 67 65 6e |m, He, 8, Oxygen| 00000320 2c 20 4f 0d 03 fc 23 20 dc 20 31 30 2c 20 4e 65 |, O...# . 10, Ne| 00000330 6f 6e 2c 20 4e 65 2c 20 39 32 2c 20 55 72 61 6e |on, Ne, 92, Uran| 00000340 69 75 6d 2c 20 55 0d 04 06 16 20 dc 20 30 2c 20 |ium, U.... . 0, | 00000350 4e 6f 74 68 69 6e 67 2c 20 4e 69 6c 0d 07 d0 26 |Nothing, Nil...&| 00000360 20 dc 20 22 57 68 69 63 68 20 65 6c 65 6d 65 6e | . "Which elemen| 00000370 74 20 22 2c 20 22 45 6e 64 20 6f 66 20 74 65 73 |t ", "End of tes| 00000380 74 22 0d 07 da 29 20 dc 20 22 6d 61 6b 65 73 20 |t"...) . "makes | 00000390 75 70 20 37 38 25 20 6f 66 20 61 69 72 22 2c 20 |up 78% of air", | 000003a0 4e 69 74 72 6f 67 65 6e 2c 20 4e 0d 07 e4 3b 20 |Nitrogen, N...; | 000003b0 dc 20 22 69 73 20 61 20 62 72 6f 77 6e 20 6c 69 |. "is a brown li| 000003c0 71 75 69 64 20 61 74 20 72 6f 6f 6d 20 74 65 6d |quid at room tem| 000003d0 70 65 72 61 74 75 72 65 22 2c 20 42 72 6f 6d 69 |perature", Bromi| 000003e0 6e 65 2c 20 42 72 0d 07 ee 36 20 dc 20 22 68 61 |ne, Br...6 . "ha| 000003f0 73 20 61 6e 20 6f 78 69 64 65 20 6b 6e 6f 77 6e |s an oxide known| 00000400 20 61 73 20 73 61 70 70 68 69 72 65 22 2c 20 41 | as sapphire", A| 00000410 6c 75 6d 69 6e 69 75 6d 2c 20 41 6c 0d 07 f8 35 |luminium, Al...5| 00000420 20 dc 20 22 77 61 73 20 64 69 73 63 6f 76 65 72 | . "was discover| 00000430 65 64 20 62 79 20 4a 6f 73 65 70 68 20 50 72 69 |ed by Joseph Pri| 00000440 65 73 74 6c 79 22 2c 20 4f 78 79 67 65 6e 2c 20 |estly", Oxygen, | 00000450 4f 0d 08 02 39 20 dc 20 22 68 61 73 20 66 6f 72 |O...9 . "has for| 00000460 6d 73 20 63 61 6c 6c 65 64 20 64 69 61 6d 6f 6e |ms called diamon| 00000470 64 20 61 6e 64 20 67 72 61 70 68 69 74 65 22 2c |d and graphite",| 00000480 20 43 61 72 62 6f 6e 2c 20 43 0d 08 0c 1e 20 dc | Carbon, C.... .| 00000490 20 22 45 6e 64 20 6f 66 20 74 65 73 74 22 2c 20 | "End of test", | 000004a0 69 73 2c 20 68 65 72 65 0d ff |is, here..| 000004aa