Quiz on capitals or states.
Appears on
Gallery
Source Code
5 REM capitals 2 6 PAPER 1: BORDER 1: INK 7: CLS 8 DIM l(50) 9 LOAD "usa"SCREEN$ 10 PRINT AT 10,6;"STATES AND CAPITALS" 15 PRINT AT 13,9; FLASH 1;"Use Caps Lock." 20 PRINT AT 20,3;"Press any key to continue": PAUSE 0 40 RESTORE : LET c=0: CLS 50 PRINT AT 5,9;"DO YOU WISH TO" 55 PRINT AT 9,5;"(1) GUESS THE CAPITALS" 60 PRINT AT 11,5;"(2) OR GUESS THE STATES" 70 PRINT AT 16,10; FLASH 1;"PRESS 1 OR 2" 80 IF INKEY$="1" THEN GO TO 100 90 IF INKEY$="2" THEN GO TO 400 95 GO TO 80 100 FOR f=1 TO 10 110 FOR d=1 TO (RND*50)+1 120 READ a$: READ b$: READ x 130 NEXT d 140 RESTORE : CLS 150 IF l(x)=1 THEN GO TO 110 160 LET l(x)=1 330 PRINT AT 5,3;"(";f;") ";"What is the capital of ";AT 7,(32-LEN a$)/2;a$;"?" 350 INPUT c$ 352 IF c$=b$ THEN GO SUB 3000 353 IF c$<>b$ THEN GO SUB 2000 355 PRINT 360 PRINT "Your answer was ";c$ 365 PRINT 370 PRINT "The correct answer is ";''TAB (32-LEN b$)/2;b$ 375 PRINT : PRINT 377 PRINT TAB 3; INVERSE 1;"Press any key to continue": PAUSE 0 380 IF f=10 THEN GO TO 4000 390 NEXT f 400 FOR f=1 TO 10 410 FOR d=1 TO (RND*50)+1 420 READ b$: READ a$: READ x 430 NEXT d 440 RESTORE : CLS 450 IF l(x)=1 THEN GO TO 410 460 LET l(x)=1 530 PRINT AT 5,1;"(";f;")";" What state has the capital";AT 7,(32-(LEN a$+3))/2;"of ";a$;"?" 550 INPUT c$ 552 IF c$=b$ THEN GO SUB 3000 553 IF c$<>b$ THEN GO SUB 2000 555 PRINT 560 PRINT "Your answer was ";c$ 565 PRINT 570 PRINT "The correct answer is ";''TAB (32-LEN b$)/2;b$ 575 PRINT : PRINT 577 PRINT TAB 3; INVERSE 1;"Press any key to continue": PAUSE 0 580 IF f=10 THEN GO TO 4000 590 NEXT f 720 DATA "ALABAMA","MONTGOMERY",1,"ALASKA","JUNEAU",2 730 DATA "ARIZONA","PHOENIX",3,"ARKANSAS","LITTLE ROCK",4 740 DATA "CALIFORNIA","SACRAMENTO",5,"COLORADO","DENVER",6 750 DATA "CONNECTICUT","HARTFORD",7,"DELAWARE","DOVER",8 760 DATA "FLORIDA","TALLAHASSEE",9,"GEORGIA","ATLANTA",10 770 DATA "HAWAII","HONOLULU",11,"IDAHO","BOISE",12 780 DATA "ILLINOIS","SPRINGFIELD",13,"INDIANA","INDIANAPOLIS",14 790 DATA "IOWA","DES MOINES",15,"KANSAS","TOPEKA",16 800 DATA "KENTUCKY","FRANKFORT",17,"LOUISIANA","BATON ROUGE",18 810 DATA "MAINE","AUGUSTA",19,"MARYLAND","ANNAPOLIS",20 820 DATA "MASSACHUSETTS","BOSTON",21,"MICHIGAN","LANSING",22 830 DATA "MINNESOTA","ST. PAUL",23,"MISSISSIPPI","JACKSON",24 840 DATA "MISSOURI","JEFFERSON CITY",25,"MONTANA","HELENA",26 850 DATA "NEBRASKA","LINCOLN",27,"NEVADA","CARSON CITY",28 860 DATA "NEW HAMPSHIRE","CONCORD",29,"NEW JERSEY","TRENTON",30 870 DATA "NEW MEXICO","SANTA FE",31,"NEW YORK","ALBANY",32 880 DATA "NORTH CAROLINA","RALEIGH",33,"NORTH DAKOTA","BISMARCK",34 890 DATA "OHIO","COLUMBUS",35,"OKLAHOMA","OKLAHOMA CITY",36 900 DATA "OREGON","SALEM",37,"PENNSYLVANIA","HARRISBURG",38 910 DATA "RHODE ISLAND","PROVIDENCE",39,"SOUTH CAROLINA","COLUMBIA",40 920 DATA "SOUTH DAKOTA","PIERRE",41,"TENNESSEE","NASHVILLE",42 930 DATA "TEXAS","AUSTIN",43,"UTAH","SALT LAKE CITY",44 940 DATA "VERMONT","MONTPELIER",45,"VIRGINIA","RICHMOND",46 950 DATA "WASHINGTON","OLYMPIA",47,"WEST VIRGINIA","CHARLESTON",48 960 DATA "WISCONSIN","MADISON",49,"WYOMING","CHEYENNE",50 2000 PRINT : PRINT FLASH 1;"HINT";: PRINT " - It begins with the letter - ";b$(1);" ";''TAB 12;"TRY AGAIN" 2020 INPUT c$ 2050 RETURN 3000 REM music 3010 BEEP .5,10: BEEP .2,8: BEEP .2,8: BEEP .2,6: BEEP .2,5: BEEP .2,6: BEEP .5,8: BEEP .4,3 3015 LET c=c+1 3020 RETURN 4000 REM number correct 4005 CLS : PRINT AT 5,5;"On the first response";AT 8,7;"You got ";c;" or ";c/f*(100);"%";AT 12,6;" out of 10 correct." 4010 PRINT AT 18,3; FLASH 1;"Press any key to continue.": PAUSE 0 4020 GO TO 40