{"id":875,"date":"2024-11-13T11:10:46","date_gmt":"2024-11-13T04:10:46","guid":{"rendered":"https:\/\/sunflower-math.com\/?p=875"},"modified":"2024-11-13T12:45:22","modified_gmt":"2024-11-13T05:45:22","slug":"cc","status":"publish","type":"post","link":"https:\/\/sunflower-math.com\/?p=875","title":{"rendered":"cc"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"vi\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>B\u00e0i Test Tr\u1eafc Nghi\u1ec7m<\/title>\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Latin+Modern:wght@400&#038;display=swap\" rel=\"stylesheet\">\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/KaTeX\/0.13.18\/katex.min.css\">\n    <script defer src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/KaTeX\/0.13.18\/katex.min.js\"><\/script>\n    <script defer src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/KaTeX\/0.13.18\/contrib\/auto-render.min.js\"\n            onload=\"renderMathInElement(document.body, {\n                delimiters: [\n                    {left: '<p class=\"ql-center-displayed-equation\" style=\"line-height: 20px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sunflower-math.com\/wp-content\/ql-cache\/quicklatex.com-77baa04537073105b02318b995c7964b_l3.svg\" height=\"20\" width=\"70\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#91;&#39;&#44;&#32;&#114;&#105;&#103;&#104;&#116;&#58;&#32;&#39;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>', display: true},\n                    {left: '$', right: '$', display: false}\n                ]\n            });\"><\/script>\n    <style>\n        body {\n            font-family: 'Latin Modern';\n            line-height: 1.5;\n            font-size: 19px;\n        }\n        .question {\n            background-color: #ebfab4;\n            padding: 5px;\n            margin: 10px 0;\n            border-radius: 8px;\n        }\n        .question::before {\n            content: \"C\u00e2u \" counter(question) \". \";\n            font-weight: bold;\n            display: inline;\n        }\n        h2 {\n            font-size: 19px;\n            font-weight: normal;\n            margin-bottom: 0;\n        }\n        .options {\n            margin-top: 0;\n        }\n        .options label { \n            font-size: 19px; \n            display: block; \n            margin: 3px 0;\n        }\n        .blank-container {\n            display: inline-flex;\n            align-items: center;\n            margin-left: 10px;\n        }\n        .blank {\n            border-bottom: 1px solid #333;\n            width: 200px;\n            text-align: center;\n        }\n        #result {\n            margin-top: 20px;\n            font-weight: bold;\n        }\n        .katex {\n            font-size: 19px;\n        }       \n        .preview {\n            font-size: 20px;\n            font-weight: bold;\n            color: green;\n        }\n        #timer {\n            font-size: 20px;\n            font-weight: bold;\n            color: red;\n            margin-top: 20px;\n        }\n    <\/style>\n<\/head>\n<body>\n\n<div id=\"timer\">Th\u1eddi gian c\u00f2n l\u1ea1i: <\/div> <!-- Th\u00eam \u0111\u1ed3ng h\u1ed3 th\u1eddi gian -->\n\n<form id=\"quiz-form\">\n    <!-- N\u1ed9i dung b\u00e0i test -->\n    <!-- \u0110\u1eb7t c\u00e1c ph\u1ea7n c\u00e2u h\u1ecfi tr\u1eafc nghi\u1ec7m c\u1ee7a b\u1ea1n t\u1ea1i \u0111\u00e2y -->\n    <!-- Ph\u1ea7n 1, Ph\u1ea7n 2, Ph\u1ea7n 3 \u0111\u01b0\u1ee3c gi\u1eef nguy\u00ean n\u1ed9i dung nh\u01b0 trong m\u00e3 c\u1ee7a b\u1ea1n -->\n    \n   <!-- Ph\u1ea7n 1: C\u00e2u h\u1ecfi tr\u1eafc nghi\u1ec7m -->\n    <h1 style=\"font-size: 15px; font-weight: bold; color: #333\">1. Ph\u1ea7n tr\u1eafc nghi\u1ec7m nhi\u1ec1u l\u1ef1a ch\u1ecdn<\/h1>\n    <div class=\"section\" id=\"section-1\">\n        <div class=\"question\">\n            <h2>Cho h\u00e0m s\u1ed1 $y=f(x)$ c\u00f3 b\u1ea3ng bi\u1ebfn thi\u00ean nh\u01b0 sau:<\/h2>\n            <div style=\"text-align: center;\">\n                <!-- C\u00e2u h\u1ecfi c\u00f3 h\u00ecnh v\u1ebd TikZ -->\n                <p class=\"ql-center-picture\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sunflower-math.com\/wp-content\/ql-cache\/quicklatex.com-83e916c3ee6af19a755026099f072499_l3.svg\" height=\"196\" width=\"495\" class=\"ql-img-picture \" alt=\"Rendered by QuickLaTeX.com\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>\n            <\/div>\n            <p>Gi\u00e1 tr\u1ecb c\u1ef1c \u0111\u1ea1i c\u1ee7a h\u00e0m s\u1ed1 $y = f(x)$ l\u00e0:<\/p>\n            <div class=\"options\">\n                <label><input type=\"radio\" data-value=\"true\" name=\"question10\"> $0$. <\/label>\n                <label><input type=\"radio\" data-value=\"false\" name=\"question10\"> $1$. <\/label>\n                <label><input type=\"radio\" data-value=\"false\" name=\"question10\"> $-3$. <\/label>\n                <label><input type=\"radio\" data-value=\"false\" name=\"question10\"> $5$. <\/label>\n            <\/div>\n        <\/div>\n\n        <!-- C\u00e2u h\u1ecfi kh\u00e1c n\u1ebfu c\u00f3 -->\n        <div class=\"question\">\n            <h2>Gi\u00e1 tr\u1ecb nh\u1ecf nh\u1ea5t c\u1ee7a h\u00e0m s\u1ed1 $y = f(x) =x^3 + 3x &#8211; 6$ tr\u00ean \u0111o\u1ea1n $[1;3]$ l\u00e0:<\/h2>\n            <div class=\"options\">\n                <label><input type=\"radio\" data-value=\"false\" name=\"question11\"> $-39$. <\/label>\n                <label><input type=\"radio\" data-value=\"true\" name=\"question11\"> $-2$. <\/label>\n                <label><input type=\"radio\" data-value=\"false\" name=\"question11\"> $-10$. <\/label>\n                <label><input type=\"radio\" data-value=\"false\" name=\"question11\"> $-6$. <\/label>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Ph\u1ea7n 2: C\u00e2u h\u1ecfi \u0111\u00fang-sai -->\n    <h1 style=\"font-size: 15px; font-weight: bold; color: #333\">2. Ph\u1ea7n tr\u1eafc nghi\u1ec7m \u0111\u00fang sai<\/h1>\n    <div class=\"section\" id=\"section-2\">\n        <div class=\"question\">\n            <h2>Cho h\u00e0m s\u1ed1 $f(x) = x \\sin x &#8211; x$:<\/h2>\n            <div class=\"options\">\n                <label><input type=\"checkbox\" data-value=\"true\"> \u0110\u1ea1o h\u00e0m c\u1ee7a h\u00e0m s\u1ed1 \u0111\u00e3 cho l\u00e0 $f'(x) = \\cos x &#8211; 1$. <\/label>\n                <label><input type=\"checkbox\" data-value=\"false\"> Nghi\u1ec7m c\u1ee7a ph\u01b0\u01a1ng tr\u00ecnh $f'(x) = 0$ tr\u00ean \u0111o\u1ea1n $\\left[\\frac{\\pi}{2}, \\frac{3\\pi}{2}\\right]$ l\u00e0 $\\pi$. <\/label>\n                <label><input type=\"checkbox\" data-value=\"true\"> Gi\u00e1 tr\u1ecb nh\u1ecf nh\u1ea5t c\u1ee7a $f(x)$ tr\u00ean \u0111o\u1ea1n $\\left[\\frac{\\pi}{2}, \\frac{3\\pi}{2}\\right]$ l\u00e0 $\\frac{\\pi &#8211; 1}{2}$. <\/label>\n                <label><input type=\"checkbox\" data-value=\"true\"> $f(0) = 0; f(\\pi) = -\\pi$. <\/label>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Ph\u1ea7n 3: C\u00e2u \u0111i\u1ec1n khuy\u1ebft -->\n    <h1 style=\"font-size: 15px; font-weight: bold; color: #333\">3. Ph\u1ea7n tr\u1eafc nghi\u1ec7m \u0111i\u1ec1n khuy\u1ebft<\/h1>\n    <div class=\"section\" id=\"section-3\">\n        <div class=\"question\">\n            <h2>M\u1ed9t b\u1ec3 ban \u0111\u1ea7u ch\u1ee9a 160 l\u00edt n\u01b0\u1edbc. Sau \u0111\u00f3, c\u1ee9 m\u1ed7i ph\u00fat ng\u01b0\u1eddi ta b\u01a1m th\u00eam 60 l\u00edt n\u01b0\u1edbc v\u00e0o b\u1ec3, \u0111\u1ed3ng th\u1eddi cho v\u00e0o b\u1ec3 21 gam ch\u1ea5t kh\u1eed tr\u00f9ng (h\u00f2a tan). \u0110\u1eb7t $f(t)$ (gam\/l\u00edt) l\u00e0 n\u1ed3ng \u0111\u1ed9 ch\u1ea5t kh\u1eed tr\u00f9ng trong b\u1ec3 sau $t$ ph\u00fat $(t \\geq 0)$, bi\u1ebft r\u1eb1ng sau khi kh\u1ea3o s\u00e1t s\u1ef1 bi\u1ebfn thi\u00ean c\u1ee7a h\u00e0m s\u1ed1 $f(t)$, ta th\u1ea5y gi\u00e1 tr\u1ecb $f(t)$ t\u0103ng theo $t$ nh\u01b0ng kh\u00f4ng v\u01b0\u1ee3t ng\u01b0\u1ee1ng $p$ gam\/l\u00edt. T\u00ecm s\u1ed1 $p$.<\/h2>\n            <span class=\"blank-container\">\n                <input type=\"text\" class=\"blank\" data-value=\"0.35\" placeholder=\"\u0110i\u1ec1n v\u00e0o \u0111\u00e2y\" oninput=\"updatePreview(this)\">\n            <\/span>\n            <span class=\"preview\" id=\"preview-1\"><\/span>\n        <\/div>\n    <\/div>    \n    \n    \n    \n\n    <form id=\"scoreForm\">\n        <label for=\"name\">T\u00ean:<\/label>\n        <input type=\"text\" id=\"name\" name=\"name\" required><br><br>            \n    <\/form>\n<\/form>\n<button type=\"button\" id=\"submit-button\">N\u1ed9p b\u00e0i<\/button>\n<div id=\"result\"><\/div>\n\n<script>\n\/\/ T\u1ea1o h\u00e0m c\u1eadp nh\u1eadt xem tr\u01b0\u1edbc\nfunction updatePreview(input) {\n    const previewElement = input.closest('.question').querySelector('.preview');\n    const userAnswer = input.value.trim();\n    previewElement.innerHTML = userAnswer ? `<p class=\"ql-center-displayed-equation\" style=\"line-height: 14px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sunflower-math.com\/wp-content\/ql-cache\/quicklatex.com-b33f90f17a54db694571edfd9c40f7cc_l3.svg\" height=\"14\" width=\"93\" class=\"ql-img-displayed-equation \" alt=\"&#92;&#91;&#36;&#123;&#117;&#115;&#101;&#114;&#65;&#110;&#115;&#119;&#101;&#114;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p>` : '';\n    renderMathInElement(previewElement);\n}\n\n\/\/ H\u00e0m chu\u1ea9n h\u00f3a Latex\nfunction normalizeLatex(latex) {\n    latex = latex.replace(\/\\s+\/g, ' ').trim();\n    latex = latex.replace(\/\\\\dfrac{([^}]*)}{([^}]*)}\/g, (match, num, denom) => {\n        return `\\\\dfrac{${num.trim()}}{${denom.trim()}}`;\n    });\n    latex = latex.replace(\/\\\\pm\/g, '\u00b1')\n                 .replace(\/\\\\sqrt{([^}]*)}\/g, '\u221a($1)')\n                 .replace(\/\\\\frac{([^}]*)}{([^}]*)}\/g, '($1)\/($2)')\n                 .replace(\/\\\\dfrac{([^}]*)}{([^}]*)}\/g, '($1)\/($2)');\n    return latex;\n}\n\nlet totalScore = 0;\n\n\/\/ H\u00e0m t\u00ednh \u0111i\u1ec3m\nfunction calculateScore() {\n    totalScore = 0;\n    const sections = document.querySelectorAll('.section');\n\n    \/\/ Ph\u1ea7n 1: Tr\u1eafc nghi\u1ec7m nhi\u1ec1u l\u1ef1a ch\u1ecdn\n    const question1 = sections[0].querySelectorAll('.question');\n    question1.forEach(question => {\n        const selectedRadio = question.querySelector('input[type=\"radio\"]:checked');\n        if (selectedRadio && selectedRadio.dataset.value === \"true\") {\n            totalScore++;\n        }\n    });\n\n    \/\/ Ph\u1ea7n 2: Tr\u1eafc nghi\u1ec7m \u0111\u00fang sai\n    const question2 = sections[1].querySelectorAll('.question');\n    question2.forEach(question => {\n        let reasonableCount = 0;\n        const checkboxes = question.querySelectorAll('input[type=\"checkbox\"]');\n        checkboxes.forEach(checkbox => {\n            const isChecked = checkbox.checked;\n            const isTrueValue = checkbox.dataset.value === \"true\";\n            if (isChecked && isTrueValue || !isChecked && !isTrueValue) {\n                reasonableCount++;\n            }\n        });\n        function calculatePoints(reasonableCount) {\n            switch (reasonableCount) {\n                case 1: return 0.4;\n                case 2: return 1;\n                case 3: return 2;\n                case 4: return 4;\n                default: return 0;\n            }\n        }                                \n        totalScore += calculatePoints(reasonableCount);\n    });\n\n    \/\/ Ph\u1ea7n 3: \u0110i\u1ec1n khuy\u1ebft\n    const question3 = sections[2].querySelectorAll('.question');\n    question3.forEach(question => {\n        const blank = question.querySelector('input[type=\"text\"]');\n        const userAnswer = normalizeLatex(blank.value.trim());\n        const correctAnswer = normalizeLatex(blank.dataset.value.trim());\n        if (userAnswer === correctAnswer) {\n            totalScore += 2;\n        }\n    });\n\n    const maxScore = question1.length + question2.length*4 + question3.length*2;\n    document.getElementById('result').innerText = `T\u1ed5ng \u0111i\u1ec3m: ${totalScore} \/ ${maxScore}`;\n}\n\n\/\/ G\u1ecdi t\u00ednh \u0111i\u1ec3m v\u00e0 g\u1eedi d\u1eef li\u1ec7u khi n\u1ed9p b\u00e0i\ndocument.getElementById('submit-button').addEventListener('click', function() {\n    calculateScore();\n    const name = document.getElementById('name').value;\n    if (!name) {\n        alert('Vui l\u00f2ng nh\u1eadp t\u00ean c\u1ee7a b\u1ea1n tr\u01b0\u1edbc khi n\u1ed9p b\u00e0i.');\n        return;\n    }\n\n    \/\/ G\u1eedi d\u1eef li\u1ec7u\n    fetch('https:\/\/script.google.com\/macros\/s\/AKfycbzHg2x_X-slmAnt2W8uyaDLz6dPr1o96E73Xc8MTlcz6N-uHLJ65DFTGwPI_MuU9X1-\/exec', {\n        method: 'POST',\n        headers: {\n            'Content-Type': 'application\/x-www-form-urlencoded',\n        },\n        body: `name=${encodeURIComponent(name)}&score=${encodeURIComponent(totalScore)}`\n    })\n    .then(response => response.text())\n    .then(data => {\n        alert('G\u1eedi th\u00e0nh c\u00f4ng!');\n        document.getElementById('scoreForm').reset();\n        totalScore = 0;\n        document.getElementById('result').innerText = '';\n    })\n    .catch(error => console.error('L\u1ed7i:', error));\n});\n\n\n    \/\/ \u0110\u1ebfm s\u1ed1 c\u00e2u h\u1ecfi trong t\u1eebng section\n     const section1Count = document.querySelectorAll('#section-1 .question').length;\n     const section2Count = document.querySelectorAll('#section-2 .question').length;\n     const section3Count = document.querySelectorAll('#section-3 .question').length;\n\n \n     \/\/ C\u1eadp nh\u1eadt counter-reset cho t\u1eebng section\n     document.getElementById('section-2').style.setProperty('counter-reset', `question ${section1Count}`);\n     document.getElementById('section-3').style.setProperty('counter-reset', `question ${section1Count + section2Count}`);  \n\n\/\/ Thi\u1ebft l\u1eadp b\u1ed9 \u0111\u1ebfm th\u1eddi gian\nconst totalTime = 5460;\nlet timeLeft = totalTime;\n\nfunction updateTimer() {\n    const timerElement = document.getElementById('timer');\n    const minutes = Math.floor(timeLeft \/ 60);\n    const seconds = timeLeft % 60;\n    timerElement.innerText = `Th\u1eddi gian c\u00f2n l\u1ea1i: ${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;\n    \n    if (timeLeft > 0) {\n        timeLeft--;\n    } else {\n        clearInterval(timerInterval);\n        alert(\"Th\u1eddi gian \u0111\u00e3 h\u1ebft! B\u00e0i test s\u1ebd t\u1ef1 \u0111\u1ed9ng n\u1ed9p.\");\n        calculateScore();\n        document.getElementById('submit-button').click();\n    }\n}\n\nconst timerInterval = setInterval(updateTimer, 1000);\n<\/script>\n\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>B\u00e0i Test Tr\u1eafc Nghi\u1ec7m Th\u1eddi gian c\u00f2n l\u1ea1i: 1. Ph\u1ea7n tr\u1eafc nghi\u1ec7m nhi\u1ec1u l\u1ef1a ch\u1ecdn Cho h\u00e0m s\u1ed1 $y=f(x)$ c\u00f3 b\u1ea3ng bi\u1ebfn thi\u00ean nh\u01b0 sau: Gi\u00e1 tr\u1ecb c\u1ef1c \u0111\u1ea1i c\u1ee7a h\u00e0m s\u1ed1 $y = f(x)$ l\u00e0: $0$. $1$. $-3$. $5$. Gi\u00e1 tr\u1ecb nh\u1ecf nh\u1ea5t c\u1ee7a h\u00e0m s\u1ed1 $y = f(x) =x^3 + 3x &#8211; 6$ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-875","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sunflower-math.com\/index.php?rest_route=\/wp\/v2\/posts\/875","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunflower-math.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunflower-math.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunflower-math.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunflower-math.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=875"}],"version-history":[{"count":13,"href":"https:\/\/sunflower-math.com\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions"}],"predecessor-version":[{"id":889,"href":"https:\/\/sunflower-math.com\/index.php?rest_route=\/wp\/v2\/posts\/875\/revisions\/889"}],"wp:attachment":[{"href":"https:\/\/sunflower-math.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunflower-math.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunflower-math.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}