1 cls 10 print : htab 26: print "Plot Your Political Position" 20 print : htab 16: print "Copyright (c) 1987 by Richard Sharvy (v.1.0, 2002)" 22 htab 18: print "http://www.luvnpeas.org/glib/ecolibparty.html" 30 dim c$(23) : for j = 1 to 23 : read c$(j) : next j 40 data " 0---10---20---30---40---50---60---70---80---90--100" 50 data " ^ 100 | |" 60 data " ^ 95 | |" 70 data " Personal 90 | |" 80 data " liberty, 85 | Liberal | Libertarian |" 90 data " 80 | |" 100 data " privacy, 75 | |" 110 data " 70 | |" 120 data " civil 65 | | |" 130 data "liberties 60 | |" 140 data " 55 | |" 150 data " 50 | - - - - |" 160 data " 45 | |" 170 data " 40 | |" 180 data " 35 | | |" 190 data " 30 | |" 200 data " 25 | |" 210 data " 20 | |" 220 data " 15 | Totalitarian | Conservative |" 230 data " 10 | |" 240 data " 5 | |" 250 data " 0 | |" 260 data " Economic freedom, property rights, self-defense---->" 261 rem /testing/ print c$(23) 270 rem 280 dim q$(50),x(50),f(50),a(50),d(50) 290 rem Question, X-axis-measure, flag, answers, deck of addresses to shuffle. 300 rem X(i): measure associated with each question indicating degree to which 310 rem pro-liberty answer is pro- economic freedom/self-defense/property 320 rem rights (range .00 to l.00). If 1, answer adds to X-axis score only; 330 rem if 0, just to Y-axis score. If (e.g.) .8, then 80% of answer adds 340 rem to X-axis score, 20% to Y-axis score. 350 rem Y-axis= individual liberty/civil liberties/privacy. 360 rem Caution: the more questions with mixed measures, and the closer those 370 rem are to .5, the more the outcome is pushed away from UL and LR 380 rem corners. So avoid questions with mushier than .2 or .8 at most. 390 rem 3d data field F(i) is truth-value of question, used to compute score 400 rem for each answer, i.e. whether a 7 comes out 7 or 3. 410 i = 1 : xmt = 0 420 read q$(i),x(i),f(i) : rem Read questions & flags into arrays 430 if q$(i) = "DONE" then 480 440 xmt = xmt+x(i) : rem X-axis measure total 450 d(i) = i : rem initialize address deck 460 i = i+1 470 goto 420 480 numq = i-1 : rem number of questions in data 490 print : print : print numq;"questions" : print " X-axis proportion=";xmt/numq 500 rem--------------------QUESTIONS-------------------- 510 rem Data Format: "QUESTION", PROPERTY-FREEDOM MEASURE, TRUTH-VALUE 520 data "Individuals should be free to possess and to carry firearms",0.9,1 530 data "Church and state should be completely separate",0,1 540 data "The government should feed the poor",1,0 550 data "Homosexuality should be against the law",0,0 560 data "The government should guarantee everyone a job",1,0 570 data "The government should take care of people's medical needs",1,0 580 data "Marijuana should be legalized",0,1 590 data "Doctors should be free to charge whatever they please",1,1 600 data "Newspapers should be required to give equal space to opposing ideas",0.8,0 610 data "Everyone should have to carry an official identity card",0.1,0 620 data "Wages and prices should be controlled by the government",1,0 630 data "Laws restricting immigration into this country should be relaxed",0,1 640 data "The government should prohibit surrogate childbearing for money",1,0 650 data "We should make the rich pay a higher share of taxes",1,0 660 data "Police should be allowed to stop and search suspicious-looking people",0,0 670 data "I favor less federal spending and a balanced budget requirement",1,1 680 data "Education should be compulsory at least through 10th grade",0.8,0 690 data "Protective tariffs and import quotas are often beneficial & legitimate",1,0 700 data "Employers should be required to pay workers what they are truly worth",1,0 710 data "It should be legal for doctors to help people commit suicide",0,1 720 data "Everyone has a right to a college education",1,0 730 data "We should have a draft for military service",0,0 740 data "Professional boxing should be outlawed",0.9,0 750 data "I oppose compulsory seat-belt and motorcycle helmet laws",0,1 760 data "My country has a duty to fight for its values around the world",0.9,0 770 data "All sexual activity among consenting individuals should be legal",0,1 780 data "Pornography should be completely legal",0,1 790 data "DONE",0,0 800 rem----------------END OF QUESTION DATA---------------- 810 p$ = "State how strongly you agree: any number from 0 to 10 (= NO!! to YES!!)." 820 r1$ = "Enter blank line to temporarily skip current question; Q to quit and" 830 r2$ = "compute score; B to back up to preceding question and change answer." 840 dim n$(100),i$(100),n(50) : rem names, initials, displayed ques. nos. 850 dim g$(5) : g$(0) = "F" : g$(1) = "D" : g$(2) = "C" : g$(3) = "B" : g$(4) = "A" : g$(5) = "A+" 860 r = 0 : rem number of runs of program 870 rem---------------END OF INITIALIZATION--------------- 880 rem 890 rem--------------------INTRODUCTION-------------------- 900 rem // r = r+1 910 print : print : print 920 print : print "Enter your name or pseudonym ('q' to quit): "; : line input name$ 930 if name$ = "" then 920 932 if name$="q" then 9990 933 r = r+1 934 n$(r)=name$ 940 print : print "Enter one of your initials"; 950 input i$ 960 if len(i$) <> 1 then 940 970 if asc(i$) < 33 or asc(i$) > 126 then 940 980 if r = 1 then 1050 990 i = 1 1000 if i$ <> i$(i) then 1030 1010 print i$;" has already been used. Try another initial"; 1020 goto 950 1030 i = i+1 1040 if i < r then 1000 else goto 1060 1050 rem //FOR I=0 TO ASC(I$):X=RND:NEXT I:REM seed RND generator 1051 randomize timer 1060 i$(r) = i$ 1070 print : print : print "For each of the following statements, state your position:" 1080 print " 0=completely disagree, 5=half agree, 10=completely agree," 1090 print " 2=mostly disagree, 8=mostly agree, etc." 1100 print "You may use any number from 0 to 10." 1110 print : print r1$ : print r2$ 1120 rem-----Shuffle address deck----- 1130 for i = 1 to numq 1140 j = int(numq*rnd(1) +1) 1150 di = d(i) 1160 d(i) = d(j) 1170 d(j) = di 1180 n(i) = i : rem also set ques. no. array 1190 next i 1200 print : print : print "Total number of questions = ";numq : print 1210 i = 0 : sk = 0 : itried = 0 : rem questions asked, skipped, tried 1220 x = 0 : y = 0 : x1 = 0 : y1 = 0 : l = 0 : rem X-score, Y-score, max possibles, lib-score 1230 rem----------------------------MAIN LOOP---------------------------------- 1240 i = i+1 1250 di = d(i) 1260 if i = numq and sk = 0 then print : print chr$(7);"----> Last question...." 1270 print: print n(i); " "; : print q$(di); 1280 if len(q$(di)) > 71 then print 1290 input a$ 1300 rem-----Select Action----- 1310 if a$ <> "b" and a$ <> "B" then 1510 1320 if i < 2 then 1630 : rem error message 1330 print : print "Enter corrected answer" 1340 i = i-1 1350 di = d(i) 1360 a = a(di) 1370 print "Last answer was "; 1380 if a < 0 then 1480 1390 print a 1400 itried = itried-1 1410 if f(di) = 0 then let a = 10-a : rem score of last ans. 1420 x = x-a*x(di) : rem subtract score etc. 1430 y = y-a*(1-x(di)) : rem of last answer 1440 x1 = x1-10*x(di) : rem from scores etc. 1450 y1 = y1-10*(1-x(di)) 1460 l = l-a 1470 goto 1500 1480 print " -a skip-" 1490 sk = sk-1 1500 goto 1270 1510 if a$ <> "q" and a$ <> "Q" then 1550 1520 if x1 > 25 and y1 > 25 then 1980 : rem quit 1530 rem // print chr$(7) : print "***** Sorry, it is too early to quit." 1531 print chr$(7): input "It is too early to compute a score. Quit anyay ('y' or 'n')? "; confirm$ 1533 if confirm$="n" then 1270 1535 r=r-1 1540 goto 2200 1550 if a$ <> "" then 1600 1560 if sk = 0 then let sk1 = i : rem index of 1st skipped question 1570 sk = sk+1 : rem count skips 1580 a(di) = -sk : rem negative answer indicates skipped ques. 1590 goto 1760 1600 if asc(a$) < 48 or asc(a$) > 57 then 1630 1610 a = val(a$) 1620 if a >= 0 and a <= 10 then 1670 1630 rem-----Invalid Answer----- 1640 print chr$(7) : print "***** ";p$ 1650 htab 7: print r1$ : htab 7: print r2$ 1660 goto 1270 1670 rem-----Got Valid Numeric Answer----- 1680 itried = itried+1 1690 a(di) = a : rem save answer (not its score) 1700 if f(di) = 0 then let a = 10-a : rem A is score for this answer 1710 x = x+a*x(di) : rem add to scores 1720 y = y+a*(1-x(di)) 1730 l = l+a 1740 x1 = x1+10*x(di) : rem add to possible maxs 1750 y1 = y1+10*(1-x(di)) 1760 if i < numq then 1230 1770 if sk = 0 then 1980 1780 rem-----Move Skipped Questions to Bottom----- 1790 i = numq-sk : rem put Q-counter just above where skipped Qs will go 1800 print : print "Now reconsider";sk;"previously skipped questions...." 1810 if sk1 = i+1 then 1950 : rem if skipped Qs all on bottom in order... 1820 dj = d(sk1) : rem else save this address 1830 nj = n(sk1) : rem and ques. no. 1840 for k = sk1 to numq-1 : rem move remaining 1850 d(k) = d(k+1) : rem questions up one 1860 n(k) = n(k+1) 1870 next k : rem and 1880 d(numq) = dj : rem put this one 1890 n(numq) = nj : rem on bottom 1900 dj = d(sk1) 1910 if a(dj) < 0 then 1940 1920 sk1 = sk1+1 1930 goto 1900 1940 if a(dj) < -1 then 1830 1950 print "Enter Q to quit and compute final score." 1960 sk = 0 1970 goto 1230 1980 rem-----------------COMPUTE & PRINT RESULTS----------------- 1990 x2 = x/x1 : y2 = y/y1 2000 rx = int(100*x2+0.5) : rem rounded X,Y,L in per cent 2010 ry = int(100*y2+0.5) 2020 rl = int(10*l/itried+0.5) 2030 gx = int(rx/20) : rem letter grade for X,Y,L scores 2040 gy = int(ry/20) 2050 gl = int(rl/20) 2060 print : print : print "Total number of questions tried: ";itried 2070 htab 49: print "SCORE / GRADE" 2080 print "Property rights, economic freedom, self-defense ";rx;" ";g$(gx) 2090 print "Personal liberty, civil liberties, privacy-- ";ry;" ";g$(gy) 2100 print " Composite pro-liberty score--- ";rl;" ";g$(gl) 2110 print : print : print n$(r);"- your position is indicated by the `";i$; 2120 print "' in the following chart:" 2130 rem // for j = 1 to 100 : b$ = inkey$ : next j 2132 if inkey$ <> "" then 2132 2140 print : print "(Hit any key to continue.)" 2150 if inkey$ = "" then 2150 : rem loop until keyboard hit 2160 rem-----Put player's initial into chart----- 2170 y3 = 22-int(20*y2+0.5) : rem down 2180 x3 = 18+int(50*x2+0.5) : rem across 2190 rem /not supported by metal/ mid$(c$(y3),x3) = i$ 2191 c$(y3) = left$(c$(y3),x3-1) + i$ + mid$(c$(y3),x3+1,99) 2200 rem-----Print Chart, Initials Key----- 2210 if r=0 then 2300 2211 cls : print : print 2220 for j = 1 to 22 : print c$(j) : next j 2221 print c$(1) : print c$(23) 2230 rem // for j = 1 to 100 : b$ = inkey$ : next j 2231 if inkey$ <> "" then 2231 2240 if inkey$ = "" then 2240 : rem loop until keyboard hit 2250 if r = 1 then 2300 2260 print : print : print "Players so far are-" 2270 for i = 1 to r 2280 print " ";i$(i);": ";n$(i) 2290 next i 2300 goto 890 9990 print 9999 end