Robert Hurt,
online
MENTOR · SPEAKER · CONSULTANT
Answer Key for Practice Test 13
Practice Test 13
38 questions in 60 minutes
Basic, Intermediate, & Advanced Question-Types
Contractor Math & Logic Quiz
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Interactive Quiz</title>
<link href="https://fonts.googleapis.com/css2?family=Amiri&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Amiri', serif;
font-size: 20px;
margin: 40px;
background-color: #f9f9f9;
}
.quiz-container {
background: white;
border-radius: 8px;
padding: 30px;
max-width: 800px;
margin: auto;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.question {
margin-bottom: 20px;
}
.question-title {
margin-bottom: 10px;
font-weight: bold;
}
.submit-container {
margin-top: 30px;
text-align: center;
}
input[type="text"] {
font-size: 20px;
padding: 5px;
margin-bottom: 20px;
width: 100%;
}
.score-display {
margin-top: 20px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="quiz-container">
<h2>Contractor Math & Logic Quiz</h2>
<form id="quiz-form">
<label for="name-input">Enter your name:</label>
<input type="text" id="name-input" name="name" required />
<!-- Example Question Format -->
<div class="question">
<div class="question-title">1. You just wrapped up a contract project that paid $64,000 in gross income. Your state tax rate is 0%, and your federal tax rate is 25%. How much total income taxes will you owe from this contract?</div>
<label><input type="radio" name="q1" value="$16,000" /> $16,000</label><br>
<label><input type="radio" name="q1" value="$12,000" /> $12,000</label><br>
<label><input type="radio" name="q1" value="$14,000" /> $14,000</label><br>
<label><input type="radio" name="q1" value="$18,000" /> $18,000</label>
</div>
<!-- Add the rest of your 17 questions here in the same format -->
<div class="submit-container">
<button type="button" id="submit-btn">Submit</button>
<div id="score" class="score-display"></div>
</div>
</form>
</div>
<script>
const correctAnswers = {
q1: "$16,000"
// Add the rest like: q2: "$6,960", q3: "18", ... q18: "98"
};
const sheetURL = "https://script.google.com/macros/s/AKfycbzq8eGyHzqMOtYgvk05wzsdB2dU1umweIpnfP3-KfHpE7jAn7jUrVjQvLpiUab4UmO_/exec"; // Replace this with your actual URL
document.getElementById("submit-btn").addEventListener("click", function () {
const form = document.getElementById("quiz-form");
const name = document.getElementById("name-input").value.trim();
let score = 0;
const answers = [];
for (let key in correctAnswers) {
const selected = form.querySelector(`input[name="${key}"]:checked`);
answers.push(selected ? selected.value : "");
if (selected && selected.value === correctAnswers[key]) {
score++;
}
}
if (!name) {
alert("Please enter your name before submitting.");
return;
}
fetch(sheetURL, {
method: "POST",
body: JSON.stringify({
name: name,
score: score,
answers: answers
}),
headers: {
"Content-Type": "application/json"
}
})
.then(res => res.json())
.then(data => {
alert("Submission successful!");
document.getElementById("score").innerText = `Score: ${score} / ${Object.keys(correctAnswers).length}`;
})
.catch(err => {
console.error(err);
alert("Error submitting your results.");
});
});
</script>
</body>
</html>