Created
April 6, 2016 16:25
-
-
Save eevee/3aee241c401314cc7fad9afd3a0efb29 to your computer and use it in GitHub Desktop.
VTech PreComputer 1000 example programs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 B$="PRE-COMPUTER" | |
20 PRINT "I AM "; B$ | |
30 INPUT "WHAT IS YOUR NAME"; N$ | |
40 PRINT "HELLO "; N$ | |
50 INPUT "HOW OLD ARE YOU"; A | |
60 PRINT "SO "; N$; " YOU ARE" | |
70 PRINTA; "YEARS OLD" | |
80 PRINT "I HOPE" : PRINT "WE HAVE FUN!!" | |
90 END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "HOW MANY FRENCH" | |
20 INPUT "FRIES DID YOU EAT"; F | |
30 PRINT "HOW MANY INCHES" | |
40 PRINT "WAS EACH" | |
50 INPUT "FRENCH FRY"; L | |
60 LET T=F*L | |
70 PRINT "YOU JUST ATE" | |
80 PRINT "A"; T; "INCH" | |
90 PRINT "FRENCH FRY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 P1=16:P2=23 | |
20 D1=3:D2=2 | |
30 FOR I=1 TO 5 | |
40 SOUNDP1,D1 | |
50 SOUNDP2,D2 | |
60 SOUNDP2,D2 | |
70 NEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 INPUT "MINUTES"; M | |
20 INPUT "SECONDS"; S | |
30 FOR A1=1 TO M*60+S | |
40 FOR A2=1 TO 630 | |
50 NEXT | |
60 NEXT | |
70 SOUND31,9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "PICK FROM 1-100" | |
20 N=RND(100) | |
30 INPUT "TYPE YOUR GUESS"; G | |
40 IF G=N THEN 100 | |
50 IF G<N THEN 80 | |
60 PRINT "HIGH GUESS" | |
70 GOTO 30 | |
80 PRINT "LOW GUESS" | |
90 GOTO 30 | |
100 PRINT "CORRECT!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 PRINT "I WILL GUESS" | |
110 PRINT "YOUR AGE" | |
120 PRINT "FIRST, DOUBLE" | |
130 PRINT "YOUR AGE, THEN" | |
140 PRINT "ADD 10, TIMES IT" | |
150 PRINT "BY 10, DIVIDE IT" | |
160 PRINT "BY 2, AND FINALLY" | |
170 PRINT "SUBTRACT 100" | |
180 PRINT "NOW TYPE IN THE" | |
190 INPUT "NUMBER"; A | |
200 PRINT "YOUR AGE IS"; A/10+5 | |
210 INPUT "AGAIN (YES/NO)"; Y$ | |
220 IF Y$="YES" THEN 100 | |
999 END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 PRINT "STAR SATELLITE" | |
20 INPUT "HEIGHT OF SAT."; H | |
30 PRINT "DIAMETER OF" | |
40 INPUT "PLANET (M)"; D | |
50 PRINT "SPEED OF SAT." | |
60 INPUT "(M PER SEC)"; S | |
70 T=2*3.14*(D/2+H)/S | |
80 PRINT "TOTAL"; 24*60*60/T | |
90 PRINT "ROUNDS A DAY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 CLEAR 100 | |
10 DIM A$(10) | |
20 FOR A=1 TO 10 | |
30 INPUT "ANIMAL"; A$(A) | |
40 NEXT | |
50 FOR A1=1 TO 10-1 | |
60 FOR A2=A1+1 TO 10 | |
70 IF A$(A1)<A$(A2) THEN 110 | |
80 T$=A$(A1) | |
90 A$(A1)=A$(A2) | |
100 A$(A2)=T$ | |
110 NEXT | |
120 NEXT | |
130 FOR A=1 TO 10 | |
140 PRINT A$(A) | |
150 NEXT | |
160 END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 REM==INTRO== | |
110 PRINT "YOU MAY TAKE" | |
120 PRINT "FROM 1 TO 3" | |
130 PRINT "STICKS AT ONCE." | |
140 PRINT "OBJECT IS NOT TO" | |
150 PRINT "TAKE THE LAST" | |
160 PRINT "ONE. START WITH" | |
170 INPUT "HOW MANY STICKS"; T | |
180 IF T<1 THEN 170 | |
190 INPUT "YOU 1ST (YES/NO)"; Y$ | |
200 IF Y$="YES" THEN 300 | |
210 REM==COMPUTER TURN== | |
220 C=T-1-INT((T-1)/4)*4 | |
230 IF C=0 THEN C=1 | |
240 PRINT "I TAKE"; C | |
250 T=T-C | |
260 IF T>0 THEN 300 | |
270 PRINT "I LOSE" | |
280 GOTO 370 | |
290 REM==HUMAN TURN== | |
300 PRINT "STICKS LEFT"; T | |
310 INPUT "TAKE HOW MANY"; H | |
320 IF H<1 OR H>3 THEN 310 | |
330 T=T-H | |
340 IF T>0 THEN 220 | |
350 PRINT "YOU LOSE" | |
360 REM==END== | |
370 INPUT "AGAIN(YES/NO)"; Y$ | |
380 IF Y$="YES" THEN 110 | |
999 END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment