Saturday, July 16, 2011



<!DOCTYPE html>
<html>
<head>
    <title>Severe Weather Quiz</title>
    <style>
        body { font-family: Arial, sans-serif; text-align: center; }
        .quiz-container { max-width: 600px; margin: auto; }
        .question { margin-bottom: 15px; }
        button { margin-top: 10px; padding: 10px; }
    </style>
    <script>
        function checkAnswers() {
            let score = 0;
            let total = 10;
            let answers = ["b", "c", "a", "c", "b", "a", "b", "c", "a", "b"];
            
            for (let i = 1; i <= total; i++) {
                let userAnswer = document.querySelector(`input[name="q${i}"]:checked`);
                if (userAnswer && userAnswer.value === answers[i - 1]) {
                    score++;
                }
            }
            
            alert("Your score: " + score + "/" + total);
        }
    </script>
</head>
<body>
    <div class="quiz-container">
        <h2>Severe Weather Quiz</h2>
        
        <div class="question">
            <p>1. What is the most dangerous aspect of a tornado?</p>
            <input type="radio" name="q1" value="a"> The rain
            <input type="radio" name="q1" value="b"> Flying debris
            <input type="radio" name="q1" value="c"> Thunder
        </div>
        
        <div class="question">
            <p>2. What does a tornado watch mean?</p>
            <input type="radio" name="q2" value="a"> A tornado has been spotted
            <input type="radio" name="q2" value="b"> No tornadoes are expected
            <input type="radio" name="q2" value="c"> Conditions are favorable for tornadoes
        </div>
        
        <div class="question">
            <p>3. What scale is used to measure tornado intensity?</p>
            <input type="radio" name="q3" value="a"> Enhanced Fujita Scale
            <input type="radio" name="q3" value="b"> Saffir-Simpson Scale
            <input type="radio" name="q3" value="c"> Richter Scale
        </div>
        
        <div class="question">
            <p>4. What is a derecho?</p>
            <input type="radio" name="q4" value="a"> A type of tornado
            <input type="radio" name="q4" value="b"> A kind of hurricane
            <input type="radio" name="q4" value="c"> A widespread, long-lived windstorm
        </div>
        
        <div class="question">
            <p>5. What is the main cause of flash flooding?</p>
            <input type="radio" name="q5" value="a"> Tornadoes
            <input type="radio" name="q5" value="b"> Heavy rainfall in a short period
            <input type="radio" name="q5" value="c"> High humidity
        </div>
        
        <div class="question">
            <p>6. What should you do if caught outside in a lightning storm?</p>
            <input type="radio" name="q6" value="a"> Seek shelter immediately
            <input type="radio" name="q6" value="b"> Stand under a tree
            <input type="radio" name="q6" value="c"> Lie flat on the ground
        </div>
        
        <div class="question">
            <p>7. What is the safest place to be during a tornado?</p>
            <input type="radio" name="q7" value="a"> In a mobile home
            <input type="radio" name="q7" value="b"> In a basement or interior room
            <input type="radio" name="q7" value="c"> Near a window
        </div>
        
        <div class="question">
            <p>8. What is the leading cause of death in hurricanes?</p>
            <input type="radio" name="q8" value="a"> Wind
            <input type="radio" name="q8" value="b"> Lightning
            <input type="radio" name="q8" value="c"> Storm surge and flooding
        </div>
        
        <div class="question">
            <p>9. What is the minimum wind speed for a storm to be classified as a hurricane?</p>
            <input type="radio" name="q9" value="a"> 74 mph
            <input type="radio" name="q9" value="b"> 100 mph
            <input type="radio" name="q9" value="c"> 60 mph
        </div>
        
        <div class="question">
            <p>10. What is a supercell?</p>
            <input type="radio" name="q10" value="a"> A large hailstone
            <input type="radio" name="q10" value="b"> A severe thunderstorm with a rotating updraft
            <input type="radio" name="q10" value="c"> A type of flood
        </div>
        
        <button onclick="checkAnswers()">Submit</button>
    </div>
</body>
</html>









No comments:

Post a Comment