Upload train.jsonl
Browse files- train.jsonl +86 -0
train.jsonl
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"text": "<s>[INST] What are the two ways of getting the computer to do something? [/INST] There are two ways: 1. Give it commands it can act on straight away. 2. Give it a series of numbered instructions to store in its memory and carry out in sequence. This is called a program. </s>"}
|
| 2 |
+
{"text": "<s>[INST] What are keywords in BASIC used for? [/INST] Keywords in BASIC can be used both as commands and as statements in a program. </s>"}
|
| 3 |
+
{"text": "<s>[INST] What is PRINT used for? [/INST] PRINT is used to make the computer display something on the screen. </s>"}
|
| 4 |
+
{"text": "<s>[INST] What should you do at the end of each line after typing a command? [/INST] Press RETURN at the end of each line. </s>"}
|
| 5 |
+
{"text": "<s>[INST] How does the computer handle basic arithmetic operations? [/INST] The computer can do addition, subtraction, multiplication, and division easily. </s>"}
|
| 6 |
+
{"text": "<s>[INST] What symbols does the computer use for mathematical operations? [/INST] + for addition, - for subtraction, * for multiplication, / for division, ^ for raise to the power, and . for decimal point. </s>"}
|
| 7 |
+
{"text": "<s>[INST] How do you type the + or * symbols? [/INST] Press the SHIFT key and the key for the symbol you want. </s>"}
|
| 8 |
+
{"text": "<s>[INST] What does MODE 5 do? [/INST] MODE 5 clears the screen and prepares it for drawing lines and text. </s>"}
|
| 9 |
+
{"text": "<s>[INST] What does COLOUR 129 do? [/INST] COLOUR 129 selects a red background. </s>"}
|
| 10 |
+
{"text": "<s>[INST] What does CLS do? [/INST] CLS clears the screen to the background color. </s>"}
|
| 11 |
+
{"text": "<s>[INST] What is "working in command mode"? [/INST] Working in command mode means giving the computer commands that it obeys immediately. </s>"}
|
| 12 |
+
{"text": "<s>[INST] How do you use the user-defined function keys? [/INST] Each key can store a word or several words and can be programmed to perform a specific action. </s>"}
|
| 13 |
+
{"text": "<s>[INST] What does *KEY 2 COLOUR 2 ¦ M do? [/INST] It programs the f2 key to change the screen to COLOUR 2, which gives yellow lettering. </s>"}
|
| 14 |
+
{"text": "<s>[INST] What is the purpose of ¦M at the end of the line? [/INST] ¦M is the code used to get a RETURN into the User Defined Function Keys. </s>"}
|
| 15 |
+
{"text": "<s>[INST] How do you adjust the television screen display? [/INST] Use the *TV command. *TV 255 moves down one line, *TV 254 moves down two lines, *TV 1 moves up one line, and *TV 2 moves up two lines. </s>"}
|
| 16 |
+
{"text": "<s>[INST] When do the *TV movements take effect? [/INST] The movements take effect the next time you press BREAK or change MODE. </s>"}
|
| 17 |
+
{"text": "<s>[INST] What is the purpose of variables in BBC BASIC? [/INST] Variables in BBC BASIC are used to keep track of things that vary during a long calculation. </s>"}
|
| 18 |
+
{"text": "<s>[INST] How do you assign the number 5 to a variable Z in BBC BASIC? [/INST] In BBC BASIC, you can assign the number 5 to a variable Z using the command LET Z=5. </s>"}
|
| 19 |
+
{"text": "<s>[INST] What happens when you execute PRINT Z+6 after LET Z=5? [/INST] The computer will output 11. </s>"}
|
| 20 |
+
{"text": "<s>[INST] What command is used to multiply the value of Z by 12 and print it? [/INST] The command to multiply the value of Z by 12 and print it is PRINT Z * 12. </s>"}
|
| 21 |
+
{"text": "<s>[INST] How does the computer treat the variable Z after LET Z=71? [/INST] The computer updates the value of Z from 5 to 71. </s>"}
|
| 22 |
+
{"text": "<s>[INST] What is a numeric variable in BBC BASIC? [/INST] A numeric variable in BBC BASIC is a variable that can be used to store any number. </s>"}
|
| 23 |
+
{"text": "<s>[INST] Are variable names in BBC BASIC case-sensitive? [/INST] Yes, upper and lower case names are different in BBC BASIC. </s>"}
|
| 24 |
+
{"text": "<s>[INST] What are the four rules for naming variables in BBC BASIC? [/INST] 1) No spaces within the variable name. 2) Must start with a letter. 3) No punctuation marks except for underline. 4) Should not begin with BASIC keywords like PRINT and LET. </s>"}
|
| 25 |
+
{"text": "<s>[INST] How do you enable lower case characters on the BBC Micro? [/INST] To enable lower case characters, ensure that the CAPS LOCK is off. </s>"}
|
| 26 |
+
{"text": "<s>[INST] Can you provide examples of acceptable variable names in BBC BASIC? [/INST] Examples include AGE, this_year, lengthOFrod, CAR_mileage, value5, weight4, chicken2egg3. </s>"}
|
| 27 |
+
{"text": "<s>[INST] Why are certain variable names illegal in BBC BASIC? [/INST] Variable names are illegal if they have spaces, start with a number, include invalid punctuation, or start with a BASIC keyword. </s>"}
|
| 28 |
+
{"text": "<s>[INST] Is the word LET necessary before the variable name in BBC BASIC? [/INST] The word LET is optional. The computer will understand if you directly assign a value, like this_year=1982. </s>"}
|
| 29 |
+
{"text": "<s>[INST] What happens when you enter the command PRINT "HOW ARE YOU" on a BBC Micro computer? [/INST] The computer will execute the command immediately. </s>"}
|
| 30 |
+
{"text": "<s>[INST] How does a BBC Micro computer behave differently when given a statement with a line number like 10 PRINT "HOW ARE YOU"? [/INST] The computer regards that as instruction number 10 and does not execute it immediately, but expects other instructions to follow. </s>"}
|
| 31 |
+
{"text": "<s>[INST] How do you execute a set of instructions or a program on a BBC Micro computer? [/INST] Type the word RUN on the keyboard. The computer will execute the instructions one at a time and in line-number order. </s>"}
|
| 32 |
+
{"text": "<s>[INST] Write a program in BBC BASIC to repeatedly ask for a number, calculate 12 times the given number, and stop when 0 is entered. [/INST] A program to do this is \n10 REPEAT\n20 PRINT "GIVE ME A NUMBER";\n30 INPUT B\n40 PRINT "12 TIMES ";B;" IS ";12*B\n50 UNTIL B=0\n</s>"}
|
| 33 |
+
{"text": "<s>[INST] How does the BBC Micro respond when you RUN the program and reach line 20? [/INST] Line 20 will print the message "GIVE ME A NUMBER" on the screen. </s>"}
|
| 34 |
+
{"text": "<s>[INST] What is the function of the semi-colons in a PRINT statement in BBC BASIC? [/INST] The semi-colons tell the computer to print the next item on the same line as the previous one and right up against it. </s>"}
|
| 35 |
+
{"text": "<s>[INST] How do you stop a running program on a BBC Micro computer? [/INST] Press the "panic button" marked ESCAPE on the keyboard. </s>"}
|
| 36 |
+
{"text": "<s>[INST] What mode is the BBC Micro in when it shows a ">" on the screen? [/INST] When the computer shows a ">", it is in Command Mode. </s>"}
|
| 37 |
+
{"text": "<s>[INST] How do you display the program currently in memory on a BBC Micro? [/INST] Type LIST and press RETURN. </s>"}
|
| 38 |
+
{"text": "<s>[INST] How do you correct an error in a line of code on a BBC Micro? [/INST] Two ways: Retype the whole line or use the screen editor. </s>"}
|
| 39 |
+
{"text": "<s>[INST] What is the function of the DELETE key in the BBC Micro's screen editor? [/INST] The DELETE key can be used to delete characters from the input line. </s>"}
|
| 40 |
+
{"text": "<s>[INST] How do you insert a new word into an existing line of code on a BBC Micro? [/INST] Use the arrow keys to move the cursor to the desired location and then type in the new word. </s>"}
|
| 41 |
+
{"text": "<s>[INST] How can you delete a line or group of lines in a BBC BASIC program? [/INST] To delete a line, type its line number and press RETURN. To delete a set of lines, type DELETE followed by the range of line numbers. </s>"}
|
| 42 |
+
{"text": "<s>[INST] What does the RENUMBER command do in BBC BASIC? [/INST] The RENUMBER command renumbers all the lines in the program so that they are in a tidy sequence. </s>"}
|
| 43 |
+
{"text": "<s>[INST] How do you remove a program from the memory of a BBC Micro computer? [/INST] Use the command NEW or press the BREAK key. </s>"}
|
| 44 |
+
{"text": "<s>[INST] How can you retrieve a removed program on a BBC Micro computer? [/INST] Type OLD and press RETURN, provided you haven't begun to type in a new program. </s>"}
|
| 45 |
+
{"text": "<s>[INST] How do you delete a specific line in a BBC BASIC program? [/INST] To delete a specific line, type in just the line number and press RETURN. </s>"}
|
| 46 |
+
{"text": "<s>[INST] How do you replace an existing line in a BBC BASIC program? [/INST] Type in a new line with the same line number as the existing one and press RETURN; the old line will be replaced by the new one. </s>"}
|
| 47 |
+
{"text": "<s>[INST] How can you delete a range of lines in a BBC BASIC program? [/INST] To delete a range of lines, use the command DELETE followed by the first and last line numbers of the range, separated by a comma. </s>"}
|
| 48 |
+
{"text": "<s>[INST] What caution should you exercise while deleting lines in a BBC BASIC program? [/INST] You cannot retrieve these lines once deleted unless you copy them from the screen before deletion. </s>"}
|
| 49 |
+
{"text": "<s>[INST] What is the function of the RENUMBER command in BBC BASIC? [/INST] The RENUMBER command renumbers all lines in your program in a tidy sequence. </s>"}
|
| 50 |
+
{"text": "<s>[INST] Write a BBC BASIC program to illustrate the function of the RENUMBER command [/INST] A program to illustrate the function of the RENUMBER command is \n1 REM ** GOTO GOTO GOTO\n2 REM WITH ACKNOWLEDGEMENTS TO\n3 REM "COMPUTERS IN SCHOOLS"\n4 REM THE JOURNAL OF MUSE\n15 GOTO 100\n16 GOTO 95\n40 N=N+1\n44 END\n57 IF N=18 THEN PRINT "GOTO OR NOT TO GOTO"\n60 IF N>35 THEN GOTO 110\n78 GOTO 40\n95 PRINT "**THE GOTO SHOW**": GOTO 40\n100 N=0: GOTO 16\n105 PRINT "GOT TO GOTO GOTO NOW"\n110 GOTO 44\n115 PRINT "GOTO OR NOT TO GOTO"; GOTO 60\n</s>"}
|
| 51 |
+
{"text": "<s>[INST] Does the RENUMBER command also update the line numbers in the GOTO statements? [/INST] Yes, the RENUMBER command updates the line numbers referred to in GOTO statements within the program. </s>"}
|
| 52 |
+
{"text": "<s>[INST] How can you remove an existing program from the BBC Micro computer's memory? [/INST] Use the command NEW or press the BREAK key to remove the existing program from memory. </s>"}
|
| 53 |
+
{"text": "<s>[INST] Is it possible to retrieve a program once it's been removed from the BBC Micro computer's memory? [/INST] Type OLD and press RETURN to retrieve a removed program, provided you haven't started typing in a new one. </s>"}
|
| 54 |
+
{"text": "<s>[INST] How can you view the program currently in the BBC Micro computer's memory? [/INST] Use the LIST command to view the program currently in memory. </s>"}
|
| 55 |
+
{"text": "<s>[INST] What are the display modes available in Model A BBC computer? [/INST] The Model A BBC computer can display text and graphics in four different modes. </s>"}
|
| 56 |
+
{"text": "<s>[INST] How many display modes are available in Model B BBC computer? [/INST] The Model B BBC computer can show eight different modes. </s>"}
|
| 57 |
+
{"text": "<s>[INST] What is unique about Teletext Mode in BBC computers? [/INST] Teletext Mode (MODE 7) differs from all other modes in several ways such as difficulty in drawing lines or triangles and special changes in text color. </s>"}
|
| 58 |
+
{"text": "<s>[INST] How do you enter MODE 5 on a BBC computer? [/INST] To enter MODE 5, type MODE 5 and press RETURN. </s>"}
|
| 59 |
+
{"text": "<s>[INST] What colors can be displayed in MODE 5? [/INST] MODE 5 is a four-color mode with colors black, red, yellow, and white. </s>"}
|
| 60 |
+
{"text": "<s>[INST] How do you change the text color in BBC BASIC? [/INST] Use the COLOUR statement, followed by a number corresponding to the desired color. </s>"}
|
| 61 |
+
{"text": "<s>[INST] How can the background color be changed in BBC BASIC? [/INST] Use COLOUR commands such as COLOUR 128 for black, COLOUR 129 for red, COLOUR 130 for yellow, and COLOUR 131 for white. </s>"}
|
| 62 |
+
{"text": "<s>[INST] What is the GCOL command used for in BBC BASIC? [/INST] GCOL is used to change the color of graphics. </s>"}
|
| 63 |
+
{"text": "<s>[INST] How are coordinates specified when drawing lines and triangles in BBC BASIC? [/INST] Coordinates are specified with two numbers: the x and y coordinates. </s>"}
|
| 64 |
+
{"text": "<s>[INST] Write a program to draw a line from point 1000,0 to 1000,1000. [/INST] A program to draw a line is \nMOVE 1000,0\nDRAW 1000,1000\n</s>"}
|
| 65 |
+
{"text": "<s>[INST] What command moves the cursor without drawing a line in BBC BASIC? [/INST] Use the MOVE command to move the cursor without drawing a line. </s>"}
|
| 66 |
+
{"text": "<s>[INST] How do you set up a graphics window in BBC BASIC? [/INST] Use the VDU 24 command, followed by four values to specify the window's dimensions. </s>"}
|
| 67 |
+
{"text": "<s>[INST] How do you set up a text window in BBC BASIC? [/INST] Use the VDU 28 command, followed by four values to specify the window's dimensions. </s>"}
|
| 68 |
+
{"text": "<s>[INST] How can you clear the text area in BBC BASIC? [/INST] Use the CLS command to clear the text area. </s>"}
|
| 69 |
+
{"text": "<s>[INST] How can you clear the graphics area in BBC BASIC? [/INST] Use the CLG command to clear the graphics area. </s>"}
|
| 70 |
+
{"text": "<s>[INST] What is the role of VDU 26 command in BBC BASIC? [/INST] VDU 26 resets both text and graphics windows to fill the whole screen. </s>"}
|
| 71 |
+
{"text": "<s>[INST] What does VDU 5 enable in BBC BASIC? [/INST] VDU 5 allows text to be drawn at any position inside a graphics window. </s>"}
|
| 72 |
+
{"text": "<s>[INST] Write a BBC BASIC program to set text and graphics areas and draw lines. [/INST] A program to set text and graphics areas and draw lines is \n10 MODE 5\n20 VDU 24, 0; 0; 500; 1000;\n30 VDU 28,10,20,19,5\n40 COLOUR 129\n50 COLOUR 2\n60 GCOL 0,130\n70 CLS : CLG\n80 FOR N=1 TO 1000\n90 PRINT "LINE"; N\n100 GCOL 0, RND (4)\n110 DRAW RND(500), RND(1000)\n120 NEXT N\nRUN\n</s>"}
|
| 73 |
+
{"text": "<s>[INST] What does the TAB statement do in BBC BASIC? [/INST] The TAB statement starts printing at a specific place on the screen. </s>"}
|
| 74 |
+
{"text": "<s>[INST] How many characters can a line have in the MODE 7 in BBC BASIC? [/INST] MODE 7 has 40 characters. </s>"}
|
| 75 |
+
{"text": "<s>[INST] Write a BBC BASIC program to print the value of F and 2*F at specific positions on the screen. [/INST] A program to do this is \n10 PRINT "012345678901234567890"\n20 F=16\n30 REPEAT\n40 PRINT TAB(10);F;TAB(15);2*F\n50 F=F+1\n60 UNTIL F=18\n</s>"}
|
| 76 |
+
{"text": "<s>[INST] What will happen if you put a space between TAB and its argument? [/INST] The computer will not understand and will report "No such variable." </s>"}
|
| 77 |
+
{"text": "<s>[INST] What happens if you are beyond the place you specify with TAB in BBC BASIC? [/INST] The computer moves to the next line and then tabs to the specified place. </s>"}
|
| 78 |
+
{"text": "<s>[INST] Write a BBC BASIC program that counts to 1000, printing each number at specific X and Y text coordinates. [/INST] A program to do this is \n5 CLS\n10 Q=1\n20 REPEAT\n30 PRINT TAB(18,5);Q\n40 Q=Q+1\n50 UNTIL Q=1000\n</s>"}
|
| 79 |
+
{"text": "<s>[INST] How does PRINT TAB(X,Y) differ from PRINT TAB(X) in BBC BASIC? [/INST] PRINT TAB(X,Y) allows text to be printed at any specific X and Y character location on the screen. </s>"}
|
| 80 |
+
{"text": "<s>[INST] Write a BBC BASIC program to subscript the chemical formula H2. [/INST] A program to do this is \n10 MODE 4\n20 VDU 5\n30 MOVE 500,500\n40 PRINT "H"\n50 MOVE 532,484\n60 PRINT "2"\n70 VDU 4\n</s>"}
|
| 81 |
+
{"text": "<s>[INST] What is the purpose of the VDU 5 statement in BBC BASIC? [/INST] VDU 5 enables text to be printed at the exact position of the graphics cursor. </s>"}
|
| 82 |
+
{"text": "<s>[INST] What limitations are there when using VDU 5 in BBC BASIC? [/INST] VDU 5 does not work in text-only modes like MODES 3, 6, and 7. Also, you can only print things in the graphics window and not in the text window. </s>"}
|
| 83 |
+
{"text": "<s>[INST] How can the text cursor be moved in BBC BASIC? [/INST] The text cursor can be moved with special control codes, PRINT TAB(X,Y), or the VDU command. </s>"}
|
| 84 |
+
{"text": "<s>[INST] What VDU command moves the cursor to the "home" position at the top left of the screen? [/INST] The VDU 30 command moves the cursor to the "home" position. </s>"}
|
| 85 |
+
{"text": "<s>[INST] How can you turn off the flashing cursor in BBC BASIC? [/INST] The flashing cursor can be turned off with the statement VDU 23;8202;0;0;0;. </s>"}
|
| 86 |
+
{"text": "<s>[INST] How can you turn the cursor back on in BBC BASIC? [/INST] The cursor can be turned back on with the MODE statement. </s>"}
|