make a fake iq test that asks you a bunch of questions and generates a result based off of it. basically each question's anwser will make you 'lose points' or 'gain points'. the iq generated must be 0 - 200. html/css/js. also make the UX kinda bad
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Sure, I can help you create a simple, intentionally poorly designed IQ test using HTML, CSS, and JavaScript. This example will include a series of questions where each answer will either add or subtract points from a total score, and the final score will be mapped to an IQ range from 0 to 200.
Here's the code:
HTML (index.html)
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fake IQ Test</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Fake IQ Test</h1>
<form id="iqForm">
<div class="question">
<p>1. What is 2 + 2?</p>
<input type="radio" name="q1" value="4"> 4<br>
<input type="radio" name="q1" value="5"> 5<br>
<input type="radio" name="q1" value="3"> 3<br>
</div>
<div class="question">
<p>2. What is the capital of France?</p>
<input type="radio" name="q2" value="10"> Paris<br>
<input type="radio" name="q2" value="-5"> Berlin<br>
<input type="radio" name="q2" value="-10"> Madrid<br>
</div>
<div class="question">
<p>3. What is the square root of 16?</p>
<input type="radio" name="q3" value="10"> 4<br>
<input type="radio" name="q3" value="-5"> 6<br>
<input type="radio" name="q3" value="-10"> 8<br>
</div>
<div class="question">
<p>4. Who wrote "To Kill a Mockingbird"?</p>
<input type="radio" name="q4" value="10"> Harper Lee<br>
<input type="radio" name="q4" value="-5"> J.K. Rowling<br>
<input type="radio" name="q4" value="-10"> Ernest Hemingway<br>
</div>
<div class="question">
<p>5. What is the boiling point of water in Celsius?</p>
<input type="radio" name="q5" value="10"> 100<br>
<input type="radio" name="q5" value="-5"> 90<br>
<input type="radio" name="q5" value="-10"> 80<br>
</div>
<button type="button" onclick="calculateIQ()">Submit</button>
</form>
<div id="result"></div>
</div>
<script src="script.js"></script>
</body>
</html>
function calculateIQ() {
const form = document.getElementById('iqForm');
const resultDiv = document.getElementById('result');
let score = 0;
const answers = {
q1: form.q1.value,
q2: form.q2.value,
q3: form.q3.value,
q4: form.q4.value,
q5: form.q5.value
};
score += parseInt(answers.q1);
score += parseInt(answers.q2);
score += parseInt(answers.q3);
score += parseInt(answers.q4);
score += parseInt(answers.q5);
// Map the score to an IQ range from 0 to 200
const iq = Math.min(Math.max(score, 0), 200);
resultDiv.innerHTML = `Your IQ is: ${iq}`;
}
Explanation:
HTML: The structure includes a form with radio buttons for each question. Each radio button has a value that will either add or subtract points.
CSS: Basic styling to make the form look somewhat presentable but intentionally not great.
JavaScript: The calculateIQ function gathers the selected answers, calculates the score, and maps it to an IQ range from 0 to 200.
This example is intentionally simple and not user-friendly to meet your "bad UX" requirement. You can expand it with more questions and better styling if needed.