You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script>
// All questions with shuffled options
const allQuestions = [
{
question: "What is the term used to describe foolish or noisy behavior in the workplace that can lead to accidents?",
options: shuffleArray(["Horseplay", "Horsing around", "Practical joking", "Loud behavior"]),
answer: "Horseplay"
},
{
question: "How can interfering with the work of others or engaging in practical jokes be described?",
options: shuffleArray(["Prosplay", "Productive behavior", "Helpful actions", "Business as usual"]),
answer: "Prosplay"
},
{
question: "Which of the following actions can potentially cause accidents in a workshop environment?",
options: shuffleArray(["Running and playing", "Throwing objects", "Shouting", "All of the above"]),
answer: "All of the above"
},
{
question: "In the context of good work habits, what does a safe worker do to prevent accidents?",
options: shuffleArray(["Keeps a tidy bench and store", "Clears the floor around the work area", "Disposes of waste in correct bins", "All of the above"]),
answer: "All of the above"
},
{
question: "How does a safe worker handle potential hazards in the workplace, such as oil spills on the floor?",
options: shuffleArray(["Leaves them for others to clean up", "Ignores them until accidents happen", "Wipes them up to prevent slips", "Reports them to management"]),
answer: "Wipes them up to prevent slips"
},
{
question: "Why is it important for a safe worker not to leave tools lying around the work area?",
options: shuffleArray(["To prevent damage to the machine", "To avoid injuries to other workers", "Both A and B", "Neither A nor B"]),
answer: "Both A and B"
},
{
question: "What is the protection from the fire?",
options: shuffleArray(["Personal safety", "Industrial safety", "Protective safety", "Personal protective safety"]),
answer: "Personal protective safety"
},
{
question: "What is the term used to describe the equipment and clothing provided to workers for protection from injury and disease?",
options: shuffleArray(["Personal safety gear", "Industrial workwear", "Protective gear", "Personal protection"]),
answer: "Personal protection"
},
{
question: "What are vices primarily used for in a workshop setting?",
options: shuffleArray(["Holding small to medium workpieces", "Welding operations", "Finishing processes", "Assembly tasks"]),
answer: "Holding small to medium workpieces"
},
{
question: "What is the material composition of the body and jaws of a typical bench vice?",
options: shuffleArray(["Cast iron body, hardened tool steel jaws", "Steel body, aluminum jaws", "Copper body, stainless steel jaws", "Plastic body, rubber jaws"]),
answer: "Cast iron body, hardened tool steel jaws"
},
{
question: "How is a vise with a swivel base primarily used in a workshop?",
options: shuffleArray(["For clamping circular workpieces", "For holding square workpieces", "For setting the work at an angle to the table", "For clamping odd-shaped rectangular pieces"]),
answer: "For setting the work at an angle to the table"
},
{
question: "What is the process of determining the size of a physical quantity compared to a reference quantity known as?",
options: shuffleArray(["Estimation", "Measurement", "Assessment", "Calibration"]),
answer: "Measurement"
},
{
question: "In the metric or SI system, what are the most common units for linear measurement?",
options: shuffleArray(["Inches, feet, yards", "Millimeters, centimeters, meters", "Pounds, kilograms, tons", "Gallons, liters, cubic feet"]),
answer: "Millimeters, centimeters, meters"
},
{
question: "What is the vernier caliper primarily used for?",
options: shuffleArray(["Measuring temperature", "Precision measurement", "Weighing objects", "Calculating speed"]),
answer: "Precision measurement"
},
{
question: "What determines the accuracy of a vernier caliper?",
options: shuffleArray(["The color of the caliper", "The material it is made from", "The graduation on the vernier scale", "The size of the caliper"]),
answer: "The graduation on the vernier scale"
},
{
question: "How many types of divisions are typically found on a vernier scale?",
options: shuffleArray(["5", "10", "20", "50"]),
answer: "10"
},
{
question: "Which of the following measurements can a micrometer be used for?",
options: shuffleArray(["Weight", "Length", "Surface area", "Volume"]),
answer: "Length"
},
{
question: "How is a micrometer read to obtain a precise measurement?",
options: shuffleArray(["Sleeve reads full millimeters and thimble reads half millimeters", "Sleeve reads in units of centimeters", "Thimble reads in fractions", "Total measurement is a calculation based on visual inspection"]),
answer: "Sleeve reads full millimeters and thimble reads half millimeters"
},
{
question: "Which method of measuring involves reading the dimension directly from a scale in contact with the object?",
options: shuffleArray(["Direct method", "Indirect method", "Advanced method", "Parallel method"]),
answer: "Direct method"
},
{
question: "What are some examples of indirect measuring tools?",
options: shuffleArray(["Vernier caliper, Vernier height gauge", "tape measure, micrometer", "Outside caliper, inside caliper", "Ruler, protractor"]),
answer: "Outside caliper, inside caliper"
},
{
question: "What is a common and simple measuring tool used for linear measurements that does not require high accuracy?",
options: shuffleArray(["Micrometer", "Vernier caliper", "Steel rule", "Protractor"]),
answer: "Steel rule"
},
{
question: "What types of material are measuring tapes typically made from?",
options: shuffleArray(["Wood and plastic", "Metal and glass", "Cloth, plastic, fiberglass", "Rubber and aluminum"]),
answer: "Cloth, plastic, fiberglass"
},
{
question: "What factors can impact the accuracy of measurements taken with measuring tools?",
options: shuffleArray(["The color of the tools", "The cleanliness of the work area", "The temperature and humidity", "The length of the measuring tape"]),
answer: "The temperature and humidity"
},
{
question: "What is the purpose of marking out in a workshop setting?",
options: shuffleArray(["Transferring measurements from a drawing to the workplace", "Cleaning the work area", "Removing excess material", "Inspecting finished products"]),
answer: "Transferring measurements from a drawing to the workplace"
},
{
question: "Which marking out tool is used for scratching fine lines on the workplace?",
options: shuffleArray(["Scriber", "Odd leg caliper", "Dividers", "Trammel points"]),
answer: "Scriber"
},
{
question: "How are dividers primarily used in marking out tasks?",
options: shuffleArray(["For creating straight lines", "For marking circles and arcs", "For measuring angles", "For checking flatness of surfaces"]),
answer: "For marking circles and arcs"
},
{
question: "What is the purpose of trammel points in marking out?",
options: shuffleArray(["Scribing small dots", "Marking out large distances and circles", "Centering holes to be drilled", "Checking surface flatness"]),
answer: "Marking out large distances and circles"
},
{
question: "How are centre punches used in marking out operations?",
options: shuffleArray(["To locate circles and arcs centers", "For setting the center of a hole to be drilled", "For measuring the diameter of a circle", "For drawing parallel lines"]),
answer: "For setting the center of a hole to be drilled"
},
{
question: "What is the main function of squares in marking out tasks?",
options: shuffleArray(["Accuracy of angles", "Checking surface flatness", "Drawing circles and arcs", "Inspecting finished products"]),
answer: "Accuracy of angles"
},
{
question: "What is the vernier height gauge primarily used for in marking out?",
options: shuffleArray(["Checking length", "Measuring height of a job", "Drawing straight lines", "Transferring measurements to the workpiece"]),
answer: "Transferring measurements to the workpiece"
}
];
// Shuffle the questions array
const quizData = shuffleArray(allQuestions);
let currentQuestion = 0;
let score = 0;
const quizContainer = document.getElementById('quiz');
const resultsContainer = document.getElementById('results');
const submitButton = document.getElementById('submit');
const progressDisplay = document.getElementById('progress');
// Function to shuffle array
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
// Display current question
function showQuestion() {
progressDisplay.textContent = `Question ${currentQuestion + 1} of ${quizData.length}`;
const question = quizData[currentQuestion];
const options = question.options.map((option, index) =>
`<label>
<input type="radio" name="question" value="${option}">
${option}
</label>`
).join('<br>');
quizContainer.innerHTML = `
<div class="question">
<div class="question-text">${question.question}</div>
<div class="options">${options}</div>
</div>
`;
}
// Check answer and show next question or results
function checkAnswer() {
const selectedOption = document.querySelector('input[name="question"]:checked');
if (!selectedOption) {
alert("Please select an answer!");
return;
}
const userAnswer = selectedOption.value;
const correctAnswer = quizData[currentQuestion].answer;
if (userAnswer === correctAnswer) {
score++;
quizContainer.querySelector('.question').classList.add('correct');
} else {
quizContainer.querySelector('.question').classList.add('incorrect');
}
currentQuestion++;
if (currentQuestion < quizData.length) {
setTimeout(showQuestion, 1000);
} else {
showResults();
}
}
// Show final results
function showResults() {
quizContainer.style.display = 'none';
submitButton.style.display = 'none';
resultsContainer.style.display = 'block';
resultsContainer.innerHTML = `
<h2>Quiz Completed!</h2>
<p>Your score: ${score} out of ${quizData.length}</p>
<p>Percentage: ${Math.round((score / quizData.length) * 100)}%</p>
<p>${getPerformanceMessage(score, quizData.length)}</p>
`;
}
// Get performance message based on score
function getPerformanceMessage(score, total) {
const percentage = (score / total) * 100;
if (percentage >= 90) return "Excellent work! You're a workshop expert! 🏆";
if (percentage >= 70) return "Great job! You have solid workshop knowledge. 👍";
if (percentage >= 50) return "Good effort! Review the materials to improve. 📚";
return "Keep practicing! Consider reviewing workshop safety and tools. 🛠️";
}
// Initialize quiz
showQuestion();
submitButton.addEventListener('click', checkAnswer);
</script>
The text was updated successfully, but these errors were encountered:
Comprehensive Workshop Tools Quiz
The text was updated successfully, but these errors were encountered: