background image

67

Example:

80 PRINT NAME$; "IS COMING"

230 PRINT "SUM="; A+B+C

READ AND DATA

When it is necessary to enter a lot of information or data into the computer, using the

INPUT

  statement can be very time consuming.  To help out use the 

READ

  and 

DATA

commands.

Example

:

10 DATA 10,60,70,80,90

20 READ A,B,C,D,E

30 PRINT A;B;C;D;E

RUN

10 60 70 80 90

The 

READ

 statement consists of a list of variable names with commas between each variable.

The 

DATA

  statement consists of a list of expressions separated by commas.  These

expressions can be either numeric or strings.  The 

READ

  statement makes the computer

look up the value of its variables from the 

DATA

  statement.  When the computer goes

to 

READ 

first it will assign the first expression from the 

DATA

  list.  The next time it goes

to 

READ

  it will assign the second value and so on.  If the 

READ

  runs out of 

DATA

  you

will get 

"? OUT OF DATA ERROR."

RESTORE

If you want to use the same data later on in the program you can do so by using the

RESTORE

  statement.

Summary of Contents for PreComputer Prestige

Page 1: ...COURSE BOOK...

Page 2: ...R 3 THE KEYBOARD 5 9 CHAPTER 4 ACTIVITIES AND FUNCTIONS 9 24 CHAPTER 5 WORD PROCESSING 24 27 CHAPTER 6 BASIC 28 83 CHAPTER 7 CALCULATOR 84 86 CHAPTER 8 TIME LIMITS 87 CHAPTER 9 SCORING 88 89 CHAPTER 1...

Page 3: ...en and a standard sized computer style keyboard that gives the user the look and the feel of a real laptop computer PRECOMPUTER PRESTIGE TM offers 42 activities that include tenses antonyms synonyms g...

Page 4: ...move exhausted or new batteries from equipment when you are not going to use it for a long time Do not dispose of batteries in fire Do not attempt to recharge ordinary batteries The supply terminals a...

Page 5: ...on Turn the unit off and unplug the adapter from the unit for 15 seconds Next plug the adapter back in and turn the unit on If the problem persists it may be the result of the adapter s wiring or the...

Page 6: ...OLUME SWITCH Adjust the volume by sliding the Volume Switch toward the right hand side to increase the volume and toward the left hand side to decrease the volume MOUSE CONNECTION 1 Make sure the unit...

Page 7: ...nctions described below Enter SPECIAL KEYS Enter Key Enter Press this key after typing or choosing an answer to confirm your selection Shift Key Press this key to type capital letters or the symbols s...

Page 8: ...ly apply for some activities only Answer Key Press this key to see the correct answer to any question Left Player Right Player Keys Press these keys in games with a 2 player mode The first person to h...

Page 9: ...want to interrupt a program in BASIC while it is running Alt key Press this key and one of the assigned keys to activate the shortcut key function in Word Processing Repeat Key Press this key when yo...

Page 10: ...he right cursor button in WORD PUZZLE to close the clue window ACTIVITY SELECTOR There are 42 activities in the PRECOMPUTER PRESTIGE TM unit and they are divided into 5 activity groups Press any one o...

Page 11: ...OSING HIGHLIGHTING During the course of entering the activities and during game play you will be asked to select choose or highlight an object a number a letter or a word This can be done in three dif...

Page 12: ...ll have to scroll through the activity list by using the UP or DOWN arrow icons located on the right side of the screen Or you can use the UP or DOWN arrow keys on the keyboard Press the Enter key to...

Page 13: ...ivities GENERAL DISPLAY In most of the activities you will see a display with status information handy icons and a working window The status information will include the player s name the number of li...

Page 14: ...GE TM learning toy supports the following printers VTECH VT 25 EPSON LQ X70 EPSON 24 PIN EPSON 9 PIN EPSON STYLUS CANON BJ30 CANON BJ300 330 HP LASER IVL HP DESKJET After setting up the printer type y...

Page 15: ...this the PRECOMPUTER PRESTIGE TM learning unit lets you set the date format that you are comfortable with There are two types of formats and they are American and British American January 1 1996 Brit...

Page 16: ...appear on the screen Type in the missing form of that verb and press the Enter key to confirm your answer GRAMMAR QUIZ A sentence will appear on the screen with one grammatical error Choose the incor...

Page 17: ...remaining are indicated on the right hand side NOTE The length of a word is indicated by the length of the flashing bar TEST TRAINER Test Trainer allows you to input information and have the unit test...

Page 18: ...If the unit locates the record it will display it on the screen If the record cannot be found the first record of the list will display Editing Records Choose the icon when you want to edit a record...

Page 19: ...ving on to the next line To do this enter your answer for the first line of the problem and press Enter to confirm The unit will automatically take you to the next line Continue to enter your answers...

Page 20: ...n screen number keyboard Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer PERCENTAGES An equation which involves a fraction and a percentage will app...

Page 21: ...the correct answer If you need help in 1 player mode press the Help key or click the icon to display the multiple choice options Using the Help will result in losing one chance DIVERSE DATES When you...

Page 22: ...Icon using the tiles You can construct the path by swapping 2 tiles at a time If you want to swap tiles select the first tile you want to swap and then click on the second tile The two tiles will trad...

Page 23: ...ctice session of Step By Step 1 You are allowed to draw whatever you like on the drawing board SECRET SEQUENCES The goal of this game is to guess the Secret Sequence The number of patterns you need to...

Page 24: ...uage Don t worry about messing up the programs The original version will always be available to start over again These simple practice programs are listed in the APPENDIX of Chapter 6 of this manual B...

Page 25: ...cessing document TELEPHONE DIRECTORY The PRECOMPUTER PRESTIGE TM learning toy comes with a built in Telephone and Address Directory You can enter the names phone numbers and addresses of your friends...

Page 26: ...E TM will respond with Correct If the word is not in the dictionary it will respond with Cannot find the word You can click the icon to get suggestions with a list of possible words CHAPTER 5 WORD PRO...

Page 27: ...select Save from the FILE menu icon and it will prompt you with the filename Press Enter to save the file or revise the name and save the file with a different name before pressing Enter to confirm Pl...

Page 28: ...four block editing tools cut block copy block paste block or clear block CUT BLOCK To cut a block of text first define the block of text and select Cut from the EDIT menu The block will be removed fr...

Page 29: ...nu icon to get a list of characters and symbols for input Press and keys to locate a symbol and press Enter to confirm Click the ESC icon on the symbol s pop up window to close the window SHORTCUT KEY...

Page 30: ...ters used in businesses which are larger and require more space to operate People today generally work with a very small version of a computer called a microcomputer A microcomputer is a computing dev...

Page 31: ...e used to write a program that a computer can carry out for you WHY SHOULD I LEARN TO USE A COMPUTER Computers are going to be part of the future Computers can do many things if they are given instruc...

Page 32: ...key is used to delete one character at a time The Del key will shift all characters to the right of the cursor one position to the left thereby erasing the character under the cursor 7 Before anythin...

Page 33: ...PRESTIGETM unit stores the line with the other lines into memory Later you can execute the program by typing the command RUN Don t forget to press the Enter key after typing RUN The program that you h...

Page 34: ...s in any order The PRECOMPUTER PRESTIGETM will sort them out for you and LIST them or RUN starting with the lowest numbered statement to the highest numbered statement It is a good idea to number your...

Page 35: ...IC you write a series of line numbered statements that tell the PRECOMPUTER PRESTIGE TM unit what to do The first statement numbered 10 tells the computer to work out the sum of three numbers and then...

Page 36: ...same as 10 6 In subtraction the order is important 10 6 is not the same as 6 10 So the order that you write numbers and do arithmetic operations is important In BASIC operations are from left to righ...

Page 37: ...simply evaluated from left to right It is necessary to have an exact set of rules to follow Here they are Functions Order in which they are performed things is parentheses brackets 1st raising to a p...

Page 38: ...in it it doesn t make another box called B with a value of 15 in it The number 10 is just replaced with the number 15 Now type 40 LET C A B press Enter This statement is a bit more complicated Here s...

Page 39: ...at the print statements on lines 50 through 70 The words in quotes are called a STRING or a LITERAL Whatever you put between a set of quotation marks will appear on the display exactly the way you ty...

Page 40: ...ber The number 9E 12 is a very large negative number while the number 9E 12 is a very small negative number 4 STRING VARIABLES String variables are similar to the numeric variables that we have been w...

Page 41: ...name The number 6 is a constant so is 4 567 or 28967 35 QUICK BROWN FOX is a string constant You can store constants to a variable That s usually done to start out a program later the contents of the...

Page 42: ...10 LET N 10 20 LET A4 NANCY LIKES CHOCOLATE CUPCAKES Another way to supply data is by using an INPUT statement Try this out by typing NEW 10 INPUT GIVE ME A NUMBER N 20 PRINT YOUR NUMBER IS N The comp...

Page 43: ...that it has to make a decision It does this by comparing two numbers arithmetic expressions or string variables It uses special symbols to represent a condition The symbol means greater than The symb...

Page 44: ...a condition The PRINT YOU ARE SMART is the thing it does for the true condition In the above example let s give A the value 80 Would the message be printed No it would not be printed because the condi...

Page 45: ...he value typed in is a Y Here s another one Type NEW 10 INPUT GIVE ME A NUMBER A 20 INPUT AND ANOTHER B 30 PRINT ADD SUBTRACT MULTIPLY OR DIVIDE 40 PRINT TYPE IN THE FIRST LETTER OF THE 50 PRINT ARITH...

Page 46: ...ement tells the computer the number of the next statement to do Line 140 is an error trap It tells you that you have not followed instructions You can experiment some more with this program and put in...

Page 47: ...NEXT statements These statements surround the instructions that you want to repeat For example type the following NEW 10 FOR N 1 TO 10 20 PRINT HELLO 30 NEXT N RUN How many times does the word HELLO g...

Page 48: ...gram looks like this NEW 10 FOR N 1 TO 10 STEP 2 20 PRINT N IS N 30 NEXT N RUN The STEP 2 part changes the meaning hidden in the NEXT N statement to be N N 2 or any other number that gets put in the S...

Page 49: ...es to the line number that you specify in the statements that will be executed sequentially until a RETURN statement is encountered At that point the program will resume at the next statement followin...

Page 50: ...e computer will assume the number of bytes of memory for strings to be 50 The use of the CLEAR command only will reserve the same number of bytes as the default value However if a value follows the CL...

Page 51: ...Example 10 DIM FRIEND 50 10 DIM PRICE 19 EDIT Use the EDIT command when you want to change a statement that has been typed into memory without re typing the entire line Just type EDIT and the line nu...

Page 52: ...specified point to be shown X represents a value of horizontal position Y represents a value of vertical position Example 10 CLS 20 PSET 100 8 The result a screen pixel at coordinate 100 8 will be tur...

Page 53: ...R DELAY 1 TO 70 50 NEXT DELAY 60 PRESET X 8 70 NEXT X 80 END VOICE This is a command to generate voice VOICE X X is the voice number A LIST OF AVAILABLE VOICE Voice Num X Voice 0 zero 1 one 2 two 3 th...

Page 54: ...7 G 18 H 19 I 20 J 21 K 22 L 23 M 24 N 25 O 26 P 27 Q 28 R 29 S 30 T 31 U 32 V 33 W 34 X 35 Y 36 Z Zed 37 Z Zee FOR TO STEP NEXT Line FOR variable initial value TO final value STEP step size optional...

Page 55: ...FOR ITEMS 1 TO 20 70 INPUT PRICE 80 SUM PRICE SUM 90 NEXT ITEMS FUNCTIONS A function is a mathematical procedure which when applied to a certain value will give a new value We call the value in brack...

Page 56: ...Gives you the value ex i e the natural antilogarithm of X INT X Gives the greatest integer which is less than or equal to X RND X Gives a random whole number between 1 and X If X equals zero RND X re...

Page 57: ...he absolute value of the result returned by INT will be greater than that of the argument Example PRINT INT 6 7 press Enter 7 RND X This will produce a random number between 1 and X if X is positive E...

Page 58: ...ue of characters Thus if you put in spaces J O H N it comes out as 7 characters STR The STR function changes a number argument into a string Let us take a look at the following example and see how it...

Page 59: ...Y turns the pixel status ON 0 the current coordinates X Y turns the pixel status OFF SUBSTRINGS It is also possible to get substrings of strings A substring is as you might guess a part of a string F...

Page 60: ...6 30 PRINT B RUN ABCDEF RIGHT A N This will return a substring but starting from the Nth character from the end and running to the last one the right most character in the string A Example 10 A WHY 2...

Page 61: ...ust enclose the string specified Refer to the appendix for the ASCII code table For example the ASCII decimal value of X is 88 If A XAB then ASC A 88 Example 10 X ASC ROY 20 PRINT X RUN 82 CHR N This...

Page 62: ...and tells the computer to GOTO another line number After the process has been completed a RETURN statement is used to send the computer back to the line immediately after the GOSUB These statements ar...

Page 63: ...ONAL BRANCHING It uses the general form IF condition THEN action clause A condition is made up of an expression a relation and an expression Any BASIC expression either numeric or string may be used b...

Page 64: ...ater than 25 then the computer simply carries on with the normal line number order in the program Notice that it is not necessary to use the ELSE part of the command here as this is optional Example 1...

Page 65: ...rs IF THEN ELSE and such statements are used where a condition is used to determine subsequent operations within the user program The logical operators are AND OR and NOT For the purpose of this discu...

Page 66: ...TH TABLE FOR AND FUNCTION A B A AND B T T T T F F F T F F F F TRUTH TABLE TABLE FOR OR FUNCTION A B A OR B T T T T F T F T T F F F Note that T TRUE and F FALSE Example 10 INPUT A B C 20 IF A B AND B C...

Page 67: ...3 15 6 binary 00000110 and 13 binary 00001101 so with reference to the OR truth table 6 OR 13 15 binary 00001111 iii 6 AND 13 4 6 binary 00000110 and 13 binary 00001101 so with reference to the AND tr...

Page 68: ...line onward If the line is longer than 20 characters you must use picture of the Right key to move to the right To continue the LISTING press the Enter key To discontinue the LISTING press the Shift a...

Page 69: ...th commas between each variable The DATA statement consists of a list of expressions separated by commas These expressions can be either numeric or strings The READ statement makes the computer look u...

Page 70: ...END RUN 1 3 8 1 3 The RESTORE command makes subsequent READ statements get their values from the start of the first DATA statement Now see if you can work out what is happening here Example 10 REM FIN...

Page 71: ...UESSING GAME 20 REM TEST OF SORTING RUN RUN tells the computer to begin to perform your program beginning with the lowest statement number STOP CONT Line STOP CONT The STOP command halts the RUNNING o...

Page 72: ...To edit a file LLIST To print out the program in the RAM buffer NEW To initialize a BASIC program and delete the program in the RAM buffer CHR To display a symbol from the character table APPENDIX EX...

Page 73: ...T CHR 92 _ 80 END 90 PRINT 100 PRINT 110 PRINT 120 PRINT CHR 92 130 END 3 AGECHECK 0 REM Just Right 10 INPUT What is your age AGE 20 PRINT Oh You are AGE years old 30 IF AGE 9 THEN GOTO 70 40 IF AGE 1...

Page 74: ...his the first time you will 50 INPUT learn about programming Y N ANSWER 60 IF ANSWER Y OR ANSWER y THEN GOTO 200 70 IF ANSWER N OR ANSWER n THEN GOTO 300 80 PRINT I don t know what you mean 90 PRINT P...

Page 75: ...50 PRINT Then your full name is SUM letters long 60 END 6 ADDMINUS 0 REM CALCULATE 10 INPUT Please input the first number A 11 INPUT And the second number B 20 PRINT Do you want to find their 30 INPUT...

Page 76: ...ND 100 20 PRINT Hi I ve got a secret number 30 PRINT between 1 and 100 40 INPUT Guess it by typing a number ANSWER 50 IF ANSWER NO THEN GOTO 200 60 IF ANSWER NO THEN GOTO 100 70 PRINT No The secret nu...

Page 77: ...PUT then what is the value of SUM ANS 50 IF ANS X Y THEN PRINT Yes you re right END 60 PRINT Oh no The answer is X Y 70 END 9 HANGMAN 0 REM HANGMAN 10 X RND 5 20 LIVE 5 30 FOR I 1 TO X 40 READ SECRET...

Page 78: ...UT Make a guess G 140 T 150 GOSUB 3000 160 FOR I 1 TO L 170 IF G MID SECRET I 1 THEN 200 180 T T MID D I 1 190 GOTO 210 200 T T G 210 NEXT I 220 IF T SECRET THEN GOTO 4000 230 IF T D THEN 1000 240 IF...

Page 79: ...T 2010 END 3000 G LEFT G 1 3010 A ASC G 3020 IF A 96 AND A 123 THEN A A 32 3030 G CHR A 3040 RETURN 4000 PRINT You are right 4010 PRINT the answer is SECRET 4020 END 10 BIRTHDAY 0 REM Birthday 10 PRIN...

Page 80: ...MON 130 DATA January Wolfgang Amadeus Mozart 140 DATA February Charles Dickens 150 DATA March Michelangelo 160 DATA April Charlie Chaplin 170 DATA May Florence Nightengale 180 DATA June Bjorn Borg 19...

Page 81: ...0 d 37 69 E 101 e 38 70 F 102 f 39 71 G 103 g 40 72 H 104 h 41 73 I 105 i 42 74 J 106 j 43 75 K 107 k 44 76 L 108 l 45 77 M 109 m 46 78 N 110 n 47 79 O 111 o 48 0 80 P 112 p 49 1 81 Q 113 q 50 2 82 R...

Page 82: ...204 141 173 i 205 142 174 206 e 143 175 207 144 176 IJ 208 145 177 ij 209 146 178 210 147 179 I 211 148 180 212 149 181 213 150 182 214 151 183 215 152 184 216 153 185 o 217 154 186 218 155 187 219 15...

Page 83: ...CANNOT CONTINUE An attempt is made to continue a program that 1 has halted due to an error 2 has been modified during a break in execution or 3 does not exist DIVISION BY ZERO A division by zero is e...

Page 84: ...statement variable OUT OF DATA A READ statement is executed when there are no DATA statements with unread data remaining in the program OUT OF MEMORY A program is too large had too many FOR loops or...

Page 85: ...mpt is made to create a string more than 255 characters long SUBSCRIPT OUT OF RANGE An array element is referenced either with a subscript that is outside the dimensions of the array or with the wrong...

Page 86: ...rows of the keyboard are used in the Calculator activity To clear the screen use the key at the bottom of the keyboard BASIC CALCULATOR OPERATIONS The basic calculator operations are Addition or Shif...

Page 87: ...ocated on the second and third rows of the keyboard Always press the function key first when using it in a problem and then enter the numbers it is to operate on AIM Operation Display Square root of a...

Page 88: ...ee sign after inputting the number Function Operation Display SINE 60 sin 60 Enter 0 30481 SINE 60 sin 60 Enter 0 866025 COSINE 60 cos 60 Enter 0 952413 COSINE 60 cos 60 Enter 0 5 TANGENT 60 tan 60 En...

Page 89: ...e the answer must be inputted within one minute In two player mode the two players must press their respective player s button in 30 seconds to get to answer first When it is your turn you have only 3...

Page 90: ...Key in the Answer 1 Multiple Choice 3 Logic Games None Business Basics All Business Basics None except Typing Game Typing Game 4 SCORING CODE 1 One Player Mode Questions per round 5 Correct answer on...

Page 91: ...e Questions per round 5 Starting Score 100 Correct answer 1st player 20 2nd player 10 Wrong answer 1st player 20 2nd player 10 4 For each word that is correctly typed 1 point is given When a word reac...

Page 92: ...2010 in the US 01235 555545 in the UK or 1 800 267 7377 in Canada A service representative will be happy to help you Item No 80 1410 SUPER SCIENCETM Item No 80 1533 FAMOUS THINGS PLACESTM Item No 80 0...

Page 93: ...in the US 01235 555545 in the UK or 1 800 267 7377 in Canada with any problems and or suggestions that you might have A service representative will be happy to help you Note This equipment generates a...

Reviews: