SIX numbers, or letters will be displayed on the screen and it is up to you to provide the next logical item to complete the series.
How to play
When you have worked out your answer, type in your item and press RETURN.
If you cannot work out the correct answer, then move on as quickly as possible as you only have 200 seconds to complete as many answers as you can.
A wrong answer will bring you the correct result from your computer, and then you will be handed back to the next sequence. If you wish to PASS on a question then type P and RETURN and you will be taken on to the next question.
After 200 seconds your score sheet will be displayed showing the number of sequences tried, correct answers, your time and your IQ level for adaptability.
Programming hints
This program has a useful facility that enables the time to be constantly displayed in seconds. This actually only occurs while the program is waiting for the player to key in something, but as most of any program's time is taken up with waiting, this is all that is required. The lines 330 and 340 perform this function. In line 330 the time is printed out until the first character is keyed in. Then in line 340 subsequent characters are accepted until Return is pressed. The Return key has an ASCII value of 13, so is represented by CHR$(13).
One change you could make is to add new sequences. To do this, allow W to have a larger maximum value in line 170. The sequence must then be defined after line 210. The sequence is held in S(2), S(3), S(4), S(5), S(6), S(7) and S(8). S(2) is defined in line 150 and is fixed for all sequences. IC is another random value which may be useful when defining a sequence. The message saying how the sequence is created is held in MS$. If the last number in sequence S(8) is less than 26 then the sequence is converted to letters.
10 REM SEQUENCE COUNTDOWN 20 REM COPYRIGHT (C) G.LUDINSKI 1983 30 MODE 4 40 DIM S(8),IP$(255):CLS 50 CLS 60 VDU23,224,0,1,2,4,136,80,32,0 70 TE=0:CR=0:TIME=0 80 CLS 90 TE=TE+1 100 IF TE=11 OR TIME >= 20000 THEN 510 110 REM 120 REM Work Out Sequence 130 REM 140 S(1)=0 150 S(2)=INT(RND(1)*9+1) 160 IC=INT(RND(1)*9+1) 170 W=INT(RND(1)*3) 180 FOR I=3 TO 8 190 IF W=0 THEN S(I)=2*S(I-1)-S(I-2) +IC:MS$="The interval increases by "+STR $(IC)+" each time" 200 IF W=1 THEN S(I)=S(I-1)+S(I-2)+I C:MS$="Each number is the sum of the pre vious two plus "+STR$(IC) 210 IF W=2 THEN S(I)=S(2)^(I-1):MS$= "Each number is "+STR$(S(2))+" to the po wer of 1,2,3,4,5,6 and 7" 220 NEXTI 230 FORI=1TO13:PRINT:NEXTI 240 REM 250 REM Display Sequence 260 REM 270 IF S(8) >26 THEN PRINTSTR$(S(2));" ";STR$(S(3));" ";STR$(S(4));" ";STR$(S( 5));" ";STR$(S(6));" ";STR$(S(7));" ... ...";:LE=0 280 IF S(8) <=26 THEN LE=1:PRINTCHR$(6 4+S(2));" ";CHR$(64+S(3));" ";CHR$(64+S( 4));" ";CHR$(64+S(5));" ";CHR$(64+S(6)); " ";CHR$(64+S(7));" ......" 290 REM 300 REM Input Answer 310 REM 320 IX=1 330 IP$(IX)=INKEY$(10):IF IP$(IX)="" T HEN PRINTTAB(0,1);INT(TIME/100):GOTO330 340 PRINTTAB(IX,15);IP$(IX);:IX=IX+1:I P$(IX)=GET$:IF IP$(IX)<>CHR$(13) THEN GO TO 340 350 I$="":FORI=1TOIX-1:I$=I$+IP$(I):NE XTI 360 REM 370 REM Check Answer 380 REM 390 *FX 15,1 400 IF LE=0 AND ABS(VAL(I$) - S(8)) <= LEN(I$)/2 THEN COLOUR1:PRINT" ";CHR$(12 8):CR=CR+1:COLOUR3:GOTO450 410 IF LE=1 AND (I$=CHR$(64+S(8)) OR I $=CHR$(65+S(8))) THEN COLOUR1:PRINT" ";C HR$(128):CR=CR+1:COLOUR3:GOTO450 420 PRINT''"No, the answer= ";S(8) 430 IF LE=1 THEN PRINT'"Replace each l etter by its position number eg. 1 f or A, 2 for B, etc." 440 PRINT'MS$ 450 PRINT'"Press <RETURN> to continue" 460 REPEATUNTILGET=13 470 GOTO80 480 REM 490 REM Score Sheet 500 REM 510 CLS 520 PRINT'"Number of sequences complet ed = ";TE 530 PRINT'"Number correct = ";CR 540 PRINT'"Time taken = ";INT(TIME/100 );" seconds" 550 IQ=INT(CR*100/5.3) 560 PRINT'"Your IQ level (adaptability ) = ";IQ 570 PRINT 580 IF CR >= 7 THEN PRINT"This is clas sed as SUPERIOR (Upper 10%)":GOTO610 590 IF CR = 6 THEN PRINT"This is class ed as GOOD (Upper 20%)":GOTO610 600 IF CR = 5 THEN PRINT"This is class ed as FAIR (Upper 60%)" 610 REM