12.07.2015 Views

page-1983-101-timex-sinclair-programming-tricks

page-1983-101-timex-sinclair-programming-tricks

page-1983-101-timex-sinclair-programming-tricks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

43 Memory TesterMost everybody can remember numbers. At least shortnumbers with few digits. But how long a number can yourecall in a flash?The computer will briefly display a number. It then willremove the number from your view and ask you to repeatwhat it was. If you make a mistake in your reply.it won'tshowyou the number again. If you miss three times, the computerwill tell you to FORGET IT, give you your score and end thegame. Then it will start over.On the other hand, if you recall correctly, the computerwill say so and then give you a new number. The newnumber will have more digits than the previous number.Each time you guess correctly, the number gets longer.No matter how good you are, at some point you won'tbe able to recall all the digits in proper sequence.By the way, if you just can't operate at the speed of thisprogram, you can slow down the display by changing thenumber 100 in line 65.How many digits can you quickly recall?Program Listing10 LET W=JJ15 LET R=JJ20 LET Z=l30 LET S=INT(lOO*RND)40 LET N=INT(S*Z)60 PRINT •REMEMBER n;N65 PAUSE 10070 CLS80 IF W=3 THEN PRINT nFORGET ITn85 IF W=3 THEN GOTO 14590 PRINT nWHAT WAS IT ?n95 INPUT S100 IF SN THEN PRINT "WRONG"105 IF SN THEN LET W=W+l110 IF SN THEN GOTO 80115 PRINT "RIGHTn63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!