User:Audacity/Userboxes/WSPQ

According to the World's Smallest Political Quiz, this user is* a Political Centrist
(Personal Freedom: 50; Economic Freedom: 50).

Use

{{User:Audacity/Userboxes/WSPQ|personal freedom #|economic freedom #}}

The template takes two arguments, based upon the results that are given by taking the World's Smallest Political Quiz:

  1. Your personal freedom index (0 to 100)
  2. Your economic freedom index (0 to 100)

It automatically calculates what to identify you as.


Note

The actual World's Smallest Political Quiz counts results on the borders between two of the four outer categories as "conservative/liberal statists" or "conservative/liberal libertarians". Due to programming difficulties, this userbox counts such reults as either conservative or liberal.

Code with explanation

{{#ifeq:<!-- This is going to see whether two variables are true. They define the boundaries of the centrist square. If both are true, it will output Centrist. -->{{#ifexpr:(({{{1|50}}}-{{{2|50}}})*(1-2*({{{1|50}}}-{{{2|50}}}<0))<= 30)|true|false}}<!--Is the absolute value of the difference less than 30? This is the left and right boundaries of the square. -->{{#ifexpr:((100-{{{1|50}}}-{{{2|50}}})*(1-2*(100-{{{1|50}}}-{{{2|50}}}<0))<= 30)|true|false}}<!--Is the absolute value of the difference of the sum and 100 less than 30? This is the top and bottom boundaries of the square. -->|truetrue|Centrist|<!-- If they're not a centrist, sort them into the other 4 categories. -->{{#switch:<!-- This is evaluating whether personal and economic freedom variables are less than or higher than 50, and sorting into 4 categories based on the result. -->{{#ifexpr:({{{1|50}}}>=50)|highp|lowp}}{{#ifexpr:({{{2|50}}}>=50)|highe|lowe}}<!-- Here's the evalutation of the variables. -->|highphighe=Libertarian|highplowe=Liberal|lowphighe=Conservative|lowplowe=Statist<!-- Here's the sorting. -->}}}}

See also

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.