Skip to content

Work shop technology #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AihamAloul opened this issue May 17, 2025 · 0 comments
Open

Work shop technology #514

AihamAloul opened this issue May 17, 2025 · 0 comments

Comments

@AihamAloul
Copy link

<title>Comprehensive Workshop Tools Quiz</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 900px; margin: 0 auto; padding: 20px; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); color: #333; } .quiz-container { background-color: rgba(255, 255, 255, 0.9); padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); } h1 { text-align: center; color: #2c3e50; margin-bottom: 30px; font-size: 2.2em; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); } .question { margin-bottom: 25px; padding: 20px; border-left: 5px solid #3498db; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.3s ease; } .question:hover { transform: translateY(-3px); } .question-text { font-weight: 600; margin-bottom: 15px; font-size: 1.1em; color: #2c3e50; } .options label { display: block; margin: 10px 0; padding: 10px 15px; background-color: #f8f9fa; border-radius: 5px; cursor: pointer; transition: all 0.2s; } .options label:hover { background-color: #e9ecef; } button { display: block; width: 200px; margin: 30px auto; padding: 12px; background: linear-gradient(to right, #3498db, #2c3e50); color: white; border: none; border-radius: 50px; cursor: pointer; font-size: 1em; font-weight: 600; box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3); transition: all 0.3s ease; } button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4); } .results { margin-top: 30px; padding: 20px; text-align: center; font-size: 1.2em; font-weight: bold; border-radius: 8px; display: none; } .correct { background-color: #d4edda; border-left-color: #28a745; } .incorrect { background-color: #f8d7da; border-left-color: #dc3545; } .progress { text-align: center; margin-bottom: 20px; font-weight: bold; color: #2c3e50; } </style>

Comprehensive Workshop Tools Quiz

Question 1 of 25
Submit Answers
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant