• Welcome to Religious Forums, a friendly forum to discuss all religions in a friendly surrounding.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Access to private conversations with other members.

    We hope to see you as a part of our community soon!

I made a political quiz :D

T-Dawg

Self-appointed Lunatic
I felt that the Political Compass wasn't very accurate (to put it mildly), so I made up my own political spectrum test! I had a little experience with java, so I made my own rudimentary quiz program.

Er, I'm not too tech savvy, unfortunately, so I don't know how I would post it online. If you want to try it out, paste this code into Eclipse (or whatever software you make java programs with) :

EDIT: There is a revised version of this quiz now. Use it instead. It is in post #5. http://www.religiousforums.com/forum/2559247-post5.html



import java.util.Scanner;


public class Driver {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

int input = 3;
double econ = 0;
double auth = 0;
Scanner keyboard = new Scanner(System.in);

System.out.println("Rate the following proposals on a scale of -2 to 2.");
System.out.println("(-2 for Strongly Disagree, and 2 for Strongly Agree)");
System.out.println("");

for(int n = 1; n < 46; n+=1)
{
String question = question(n);
System.out.print(question);
input = keyboard.nextInt();
if(input > 2)
input = 2;
if(input < -2)
input = -2;
if(n == 2 || n == 3 || n == 6 || n == 8 || n == 15 || n == 25 || n == 26 || n == 27 || n == 28 || n == 29 || n == 32 || n == 33 || n == 34 || n == 38 || n == 40)
{
// (left wing economic statements)
econ -= input;
}
else if(n == 1 || n == 7 || n == 24 || n == 31 || n == 39 || n == 43)
{
// (right wing economic statements)
econ += input;
}
else if(n == 5 || n == 9 || n == 11 || n == 12 || n == 13 || n == 14 || n == 17 || n == 19 || n == 21 || n == 22 || n == 23 || n == 35 || n == 37 || n == 42 || n == 44 || n == 45)
{
// (authoritarian statements)
auth += input;
}
else if(n == 4 || n == 10 || n == 16 || n == 18 || n == 20 || n == 30 || n == 36)
{
// (libertarian statements)
auth -= input;
}
}
System.out.println("");
System.out.println("Your score:");
System.out.printf("Economics: %f", econ/4.2);
System.out.println("");
System.out.printf("Authoritarianism: %f", auth/4.6);


}

public static String question(int n) {
String question = "";
if(n == 1)
question = "1.)There is no conflict between corporate interests and the benefit of humanity at large. ";
else if(n == 2)
question = "2.) Complete financial equality between all people is desirable (note: answer only to the statement that it is desirable, NOT if it is possible). ";
else if(n == 3)
question = "3.) Complete financial equality between all people is possible (note: only answer to the statement that it is possible, NOT if it is desirable). ";
else if(n == 4)
question = "4.)In general, freedom is more important than predictability and control. ";
else if(n == 5)
question = "5.)Obedience is a virtue in and of itself. ";
else if(n == 6)
question = "6.)A government has a duty to provide (financially/materially) for its citizens. ";
else if(n == 7)
question = "7.)The private sector is inherently more efficient than the public sector. ";
else if(n == 8)
question = "8.)Businesses that operate solely for financial gain are immoral. ";
else if(n == 9)
question = "9.)People with irrational views should not be allowed to express their ideas in public. ";
else if(n == 10)
question = "10.) Representative governments are inherently superior to monarchies and dictatorships. ";
else if(n == 11)
question = "11.) People are inherently child-like and need to be controlled and disciplined. ";
else if(n == 12)
question = "12.) Private schooling is immoral &#8211; only the government can be trusted to educate children. ";
else if(n == 13)
question = "13.) Schoolteachers should be prevented from promoting religious views. ";
else if(n == 14)
question = "14.) Schoolteachers should be prevented from promoting anti-religious views. ";
else if(n == 15)
question = "15.) Convicted felons should be prohibited from owning and buying weapons. ";
else if(n == 16)
question = "16.) Gun ownership is an important right and should not be interfered with. ";
else if(n == 17)
question = "17.) Gun ownership should be entirely outlawed. ";
else if(n == 18)
question = "18.) Free speech is an important and absolute right. ";
else if(n == 19)
question = "19.) Hate speech should be restricted. ";
else if(n == 20)
question = "20.) People should be allowed to put whatever they want on the internet, including all forms of pornography, libel, and deceit. ";
else if(n == 21)
question = "21.) Might makes right. ";
else if(n == 22)
question = "22.) It is in the best interest of society that certain people be sterilized and forbidden to reproduce. ";
else if(n == 23)
question = "23.) Abnormal sexual acts (ie, homosexuality) should be actively discouraged by the government, even if there is informed consent between the participants. ";
else if(n == 24)
question = "24.) Government intervention in the economy never turns out well. ";
else if(n == 25)
question = "25.) If a company is going out of business, the government should prop it up so that its employees don&#8217;t lose their jobs. ";
else if(n == 26)
question = "26.) The government has a duty to make sure that businesses provide safe, working products to the masses (ie, through the FDA in the food industry), as businesses themselves can only be trusted to be safe and honest when it is profitable to do so. ";
else if(n == 27)
question = "27.) People are more divided by socioeconomic class than nationality. ";
else if(n == 28)
question = "28.) The eventual dissolution of national borders into a one world government would be a good thing (note: as with #2, only answer to the desirability of the proposal, NOT the plausibility).";
else if(n == 29)
question = "29.) The public sector is inherently more trustworthy than the private sector. ";
else if(n == 30)
question = "30.) All parents have a right to raise their own children. ";
else if(n == 31)
question = "31.) Progressive taxation (taxing wealthier people at a higher percentage than poorer people) is fundamentally unfair. ";
else if(n == 32)
question = "32.) Welfare &#8211; support for those who cannot support themselves &#8211; is a good thing for any civilized nation to have (note: this is about the concept of welfare in general, not how your particular nation may implement it). ";
else if(n == 33)
question = "33.) Racial and religious diversity should be encouraged by encouraging businesses and universities to actively seek out minorities. ";
else if(n == 34)
question = "34.) Private schooling is immoral because it is wrong to profit off of a basic necessity for civilized life. ";
else if(n == 35)
question = "35.) Abortion should be outlawed in most or all cases. ";
else if(n == 36)
question = "36.) Abortion should be allowed in all cases. ";
else if(n == 37)
question = "37.) Organized gambling should be outlawed because it is immoral. ";
else if(n == 38)
question = "38.) Organized gambling should be outlawed because it is simply another way for the rich to exploit the poor. ";
else if(n == 39)
question = "39.) Casinos are legitimate businesses and should be encouraged by the government as any other business would be. ";
else if(n == 40)
question = "40.) The workers and farmers are ultimately more important than the business owners and marketers. ";
else if(n == 41)
question = "41.) &#8220;Career politicians&#8221; are fundamentally a bad thing for our government. ";
else if(n == 42)
question = "42.) Schools and universities should be regulated by the government so that acceptable standards of education are in place. ";
else if(n == 43)
question = "43.) A large government is inherently authoritarian in nature. ";
else if(n == 44)
question = "44.) Religion is a fundamentally a positive force in society that encourages goodwill and charity; it should thus be supported by the government. ";
else if(n == 45)
question = "45.) Religion is fundamentally a negative force in society that discourages free thought, encourages violence, and suppresses societal progress. As such, it should be combated by the government. ";
else
question = "There appears to have been an error in the programming...";

return question;
}

}


Thoughts?


(For the record, my score was Economics: -7.857143, Authoritarianism: 2.391304)
 
Last edited:
The site "compilr" dot com allows you to paste your code in and compile it online.

If you have your own place you can add the HTML code. It would look something like tihs:
Code:
<applet code=NameOfApplet.class name=NameOfApplet archive=NameOfApplet.jar
	width=300 height=300>
	<param name="bgcolor" value="ffffff">
	<param name="fontcolor" value="000000">
	Your browser is not Java enabled.
</applet>

My results:

Economics: -1.847, Authoritarianism: 6.492
 
Last edited:

T-Dawg

Self-appointed Lunatic
aþalwulf88;2559104 said:
The site "compilr" dot com allows you to paste your code in and compile it online.

If you have your own place you can add the HTML code. It would look something like tihs:
Code:
<applet code=NameOfApplet.class name=NameOfApplet archive=NameOfApplet.jar
	width=300 height=300>
	<param name="bgcolor" value="ffffff">
	<param name="fontcolor" value="000000">
	Your browser is not Java enabled.
</applet>

My results:

Economics: -1.847, Authoritarianism: 6.492

Right, but how would that be different from me simply attaching the Project file? I was hoping there would be a way they could run the program without having to download Eclipse. Oh wells.

Meh, it's simple enough that a person could do it manually. The code should be pretty self-explanatory.



Hmm, it still seems to have a libertarian bias to it, IMO. The problem is that political issues and social issues both get put on the same "Authoritarian/Libertarian" axis. I wonder if I should introduce a third axis... I'm not actually drawing it out, so display shouldn't be a problem...
 
I don't think you can do it directly in the forum. I'm pretty rusty when it comes to Java. I've been using MATLAB for most things for the last 7 years.

The other alternative, of course, if one looks at the code, one could do it with pen and paper.
 

T-Dawg

Self-appointed Lunatic
I've revised the test. Here is the new code:

import java.util.Scanner;


public class Driver {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

int input = 3;
double econ = 0;
double auth = 0;
double soc = 0;
int qu13 = 0;
Scanner keyboard = new Scanner(System.in);

System.out.println("Rate the following proposals on a scale of -2 to 2.");
System.out.println("(-2 for Strongly Disagree, and 2 for Strongly Agree)");
System.out.println("");

for(int n = 1; n < 51; n+=1)
{
String question = question(n);
System.out.print(question);
input = keyboard.nextInt();
if(input > 2)
input = 2;
if(input < -2)
input = -2;
if(n == 2 || n == 3 || n == 6 || n == 8 || n == 15 || n == 25 || n == 26 || n == 27 || n == 28 || n == 29 || n == 32 || n == 33 || n == 34 || n == 38 || n == 40)
{
// (left wing economic statements)
econ -= input;
}
else if(n == 1 || n == 7 || n == 24 || n == 31 || n == 39 || n == 43)
{
// (right wing economic statements)
econ += input;
}
else if(n == 5 || n == 9 || n == 11 || n == 12 || n == 13 || n == 14 || n == 17 || n == 19 || n == 21 || n == 22 || n == 46)
{
// (political authoritarian statements)
auth += input;
if(n == 13)
{
qu13 = input;
}
if(n == 14)
{
if(qu13 > 0 && input < 0)
{
auth -=input;
}
else if(qu13 < 0 && input > 0)
{
auth += input;
}
} //these two if statements make it so that questions 13 and 14 don't cancel each other out; the intent is that if user favors one over the other, user's authoritarian score will increase; libertarian scores increase by favoring neutrality
if(n == 13)
{
soc -= input;
}
else if(n == 14)
{
soc += input;
} //in addition to being indicators of one's willingness to use the educational system as an ideological mouthpiece, questions 13 and 14 also pertain to the culture war
}
else if(n == 4 || n == 10 || n == 16 || n == 18 || n == 20 || n == 30 || n == 36 || n == 49)
{
// (political libertarian statements)
auth -= input;
}
else if(n == 23|| n == 37 || n == 44 || n == 48 || n == 50)
{
// (social authoritarian statements)
soc += input;
}
else if(n == 35 || n == 36 || n == 42 || n == 45 || n == 49)
{
// (social liberal statements)
soc -= input;
}
}
System.out.println("");
System.out.println("Your score:");
System.out.printf("Economics: %f", econ/4.2);
System.out.println("");
System.out.printf("Political Authoritarianism: %f", auth/3.8);
System.out.println("");
System.out.printf("Social Authoritarianism: %f", soc/2.4);


}

public static String question(int n) {
String question = "";
if(n == 1)
question = "1.)There is no conflict between corporate interests and the benefit of humanity at large. ";
else if(n == 2)
question = "2.) Complete financial equality between all people is desirable (note: answer only to the statement that it is desirable, NOT if it is possible). ";
else if(n == 3)
question = "3.) Complete financial equality between all people is possible (note: only answer to the statement that it is possible, NOT if it is desirable). ";
else if(n == 4)
question = "4.) In general, freedom is more important than predictability and control. ";
else if(n == 5)
question = "5.) Obedience is a virtue in and of itself. ";
else if(n == 6)
question = "6.) A government has a duty to provide (financially/materially) for its citizens. ";
else if(n == 7)
question = "7. )The private sector is inherently more efficient than the public sector. ";
else if(n == 8)
question = "8.) Businesses that operate solely for financial gain are immoral. ";
else if(n == 9)
question = "9.) People with irrational views should not be allowed to express their ideas in public. ";
else if(n == 10)
question = "10.) Representative governments are inherently superior to monarchies and dictatorships. ";
else if(n == 11)
question = "11.) People are inherently child-like and need to be controlled and disciplined. ";
else if(n == 12)
question = "12.) Private schooling is immoral &#8211; only the government can be trusted to educate children. ";
else if(n == 13)
question = "13.) Schoolteachers should be prevented from promoting religious views. ";
else if(n == 14)
question = "14.) Schoolteachers should be prevented from promoting anti-religious views. ";
else if(n == 15)
question = "15.) Convicted felons should be prohibited from owning and buying weapons. ";
else if(n == 16)
question = "16.) Gun ownership is an important right and should not be interfered with. ";
else if(n == 17)
question = "17.) Gun ownership should be entirely outlawed. ";
else if(n == 18)
question = "18.) Free speech is an important and absolute right. ";
else if(n == 19)
question = "19.) Hate speech should be restricted. ";
else if(n == 20)
question = "20.) People should be allowed to put whatever they want on the internet, including all forms of pornography, libel, and deceit. ";
else if(n == 21)
question = "21.) Might makes right. ";
else if(n == 22)
question = "22.) It is in the best interest of society that certain people be sterilized and forbidden to reproduce. ";
else if(n == 23)
question = "23.) Deviant sexual acts (ie, homosexuality, BDSM, and furry fandom) are wrong, even if there is informed consent between the participants. ";
else if(n == 24)
question = "24.) Government intervention in the economy never turns out well. ";
else if(n == 25)
question = "25.) If a company is going out of business, the government should prop it up so that its employees don&#8217;t lose their jobs. ";
else if(n == 26)
question = "26.) The government has a duty to make sure that businesses provide safe, working products to the masses (ie, through the FDA in the food industry), as businesses themselves can only be trusted to be safe and honest when it is profitable to do so. ";
else if(n == 27)
question = "27.) People are more divided by socioeconomic class than nationality. ";
else if(n == 28)
question = "28.) The eventual dissolution of national borders into a one world government would be a good thing (note: as with #2, only answer to the desirability of the proposal, NOT the plausibility).";
else if(n == 29)
question = "29.) The public sector is inherently more trustworthy than the private sector. ";
else if(n == 30)
question = "30.) All parents have a right to raise their own children. ";
else if(n == 31)
question = "31.) Progressive taxation (taxing wealthier people at a higher percentage than poorer people) is fundamentally unfair. ";
else if(n == 32)
question = "32.) Welfare &#8211; support for those who cannot support themselves &#8211; is a good thing for any civilized nation to have (note: this is about the concept of welfare in general, not how your particular nation may implement it). ";
else if(n == 33)
question = "33.) Racial and religious diversity should be encouraged by encouraging businesses and universities to actively seek out minorities. ";
else if(n == 34)
question = "34.) Private schooling is immoral because it is wrong to profit off of a basic necessity for civilized life. ";
else if(n == 35)
question = "35.) If a claim can&#8217;t be scientifically tested (or was tested and failed), it should be assumed to be false. ";
else if(n == 36)
question = "36.) Abortion should be allowed in all cases. ";
else if(n == 37)
question = "37.) Organized gambling should be outlawed because it is immoral. ";
else if(n == 38)
question = "38.) Organized gambling should be outlawed because it is simply another way for the rich to exploit the poor. ";
else if(n == 39)
question = "39.) Casinos are legitimate businesses and should be encouraged by the government as any other business would be. ";
else if(n == 40)
question = "40.) The workers and farmers are ultimately more important than the business owners and marketers. ";
else if(n == 41)
question = "41.) &#8220;Career politicians&#8221; are fundamentally a bad thing for our government. ";
else if(n == 42)
question = "42.) Schools and universities should be regulated by the government so that acceptable standards of education are in place. ";
else if(n == 43)
question = "43.) A large government is inherently authoritarian and bad for the economy. ";
else if(n == 44)
question = "44.) Religion is a fundamentally a positive force in society that encourages goodwill and charity. ";
else if(n == 45)
question = "45.) Religion is fundamentally a negative force in society that discourages free thought, encourages violence, and suppresses societal progress. ";
else if(n == 46)
question = "46.) The world would be a better place if my views on religion (#44 & 45) were endorsed by the government. ";
else if(n == 47)
question = "47.) The government wrongly fills (or wrongly wants to fill) roles that should be occupied primarily by the church (ie, charity and moral guidance). ";
else if(n == 48)
question = "48.) Classroom prayer should be actively encouraged by teachers and school officials. ";
else if(n == 49)
question = "49.) The government should not be permitted to endorse any religion. ";
else if(n == 50)
question = "50.) Religious morals are necessary to maintain order in society. ";
else
question = "There appears to have been an error in the programming...";

return question;
}

}
 

T-Dawg

Self-appointed Lunatic
Also, here are my results:

Economics: -7.857143
Political Authoritarianism: 3.157895
Social Authoritarianism: -7.916667

I'm not sure what exactly makes my social authoritarian score so high. The only culture war question in which I didn't strongly go against the conservative position was the issue of gambling being immoral, where I only moderately disagreed with the conservative position. I may have done the calculations wrong.


(There's a text limit of 10000 characters per post)

EDIT: Yes, I've done the calculations wrong. I ran the calculations manually and got roughly -9.583. Does anyone know where I got the code wrong?
 
Last edited:

Splarnst

Active Member
There are millions of online polls and quizzes that run without my having to set them up. Why can't you set this up like one of them?
 

T-Dawg

Self-appointed Lunatic
There are millions of online polls and quizzes that run without my having to set them up. Why can't you set this up like one of them?

Primarily because I such at tech stuff and don't know how to make one of those :(.
 
Top