{"id":1739,"date":"2024-09-30T03:57:38","date_gmt":"2024-09-30T03:57:38","guid":{"rendered":"https:\/\/phamho.com\/book\/?p=1739"},"modified":"2024-09-30T04:07:47","modified_gmt":"2024-09-30T04:07:47","slug":"chinese-yes-no-questions-family","status":"publish","type":"post","link":"https:\/\/phamho.com\/book\/chinese-yes-no-questions-family\/","title":{"rendered":"Chinese Yes\/No Questions &#8211; Family"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"zh\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Chinese Yes\/No Questions &#8211; Family<\/title>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #ffffff;\n            margin: 0;\n            padding: 0;\n            display: flex;\n            flex-direction: column; \/* Stack elements vertically *\/\n            min-height: 100vh;\n        }\n        .menu {\n            width: 100%;\n            background-color: #d97b0f;\n            padding: 10px;\n            text-align: center;\n            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);\n            flex-shrink: 0;\n            overflow-x: auto;\n            white-space: nowrap;\n        }\n        .menu a {\n            color: #fff;\n            text-decoration: none;\n            margin: 0 8px;\n            font-weight: bold;\n            font-size: 14px;\n            display: inline-block;\n        }\n        .menu a:hover {\n            text-decoration: underline;\n        }\n        .container {\n            display: flex;\n            flex-wrap: wrap;\n            flex: 1 0 auto;\n            padding: 10px;\n            box-sizing: border-box;\n            justify-content: center;\n        }\n        .image-container, .chat-container {\n            width: 100%;\n            max-width: 600px;\n            margin-bottom: 20px;\n        }\n        .image-container {\n            text-align: center;\n        }\n        .image-container img {\n            width: 100%;\n            height: auto;\n            border-radius: 20px;\n            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n        }\n        .question-text {\n            margin: 10px 0;\n            font-weight: bold;\n            color: #333;\n            font-size: 16px;\n        }\n        .question-box {\n            margin-top: 10px;\n            padding: 10px;\n            background-color: #fff;\n            border: 2px solid #026c96;\n            border-radius: 10px;\n            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n            font-size: 18px;\n            font-weight: bold;\n            color: #026c96;\n            text-align: left;\n            max-height: 300px;\n            overflow-y: auto;\n        }\n        .chat-container {\n            background-color: #026c96;\n            border-radius: 20px;\n            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n            overflow: hidden;\n            position: relative;\n        }\n        .chat-header {\n            background-color: #d97b0f;\n            color: #fff;\n            padding: 10px;\n            text-align: center;\n            border-bottom: 1px solid #69010a;\n        }\n        .chat-header h2 {\n            margin: 0;\n            font-size: 18px;\n        }\n        .progress-container {\n            width: 100%;\n            background-color: #e0e0e0;\n            border-radius: 10px;\n            margin: 10px 0;\n            height: 10px;\n        }\n        .progress-bar {\n            width: 0%;\n            height: 100%;\n            background-color: #76c7c0;\n            border-radius: 10px;\n            transition: width 0.3s;\n        }\n        .chat-messages {\n            padding: 10px;\n            overflow-y: auto;\n            max-height: 300px;\n            background-color: #fff;\n        }\n        .message {\n            margin-bottom: 10px;\n            padding: 10px;\n            border-radius: 5px;\n            font-size: 14px;\n            line-height: 1.4;\n        }\n        .user-message {\n            background-color: #4caf50;\n            color: #fff;\n            text-align: right;\n        }\n        .bot-message {\n            background-color: #2196f3;\n            color: #fff;\n            text-align: left;\n        }\n        .chat-input {\n            display: flex;\n            align-items: center;\n            background-color: #a3e106;\n            padding: 10px;\n            justify-content: center;\n        }\n        .send-button, .stop-button, .replay-button {\n            background-color: #17c686;\n            color: #fff;\n            font-weight: bold;\n            border: none;\n            border-radius: 5px;\n            padding: 8px 10px;\n            cursor: pointer;\n            transition: background-color 0.3s;\n            flex: 1;\n            margin: 0 5px;\n            max-width: 150px;\n            font-size: 14px;\n        }\n        .stop-button {\n            background-color: #c86722;\n        }\n        .replay-button {\n            background-color: #2196f3;\n        }\n        .chat-input input {\n            flex: 2;\n            padding: 8px;\n            margin-right: 10px;\n            border: 2px solid #026c96;\n            border-radius: 5px;\n            font-size: 16px;\n        }\n\n        \/* Adjustments for smaller screens *\/\n        @media (max-width: 600px) {\n            .menu a {\n                margin: 0 5px;\n                font-size: 12px;\n            }\n            .question-text {\n                font-size: 14px;\n            }\n            .question-box {\n                font-size: 14px;\n                max-height: 200px;\n            }\n            .chat-header h2 {\n                font-size: 16px;\n            }\n            .chat-messages {\n                max-height: 200px;\n            }\n            .message {\n                font-size: 13px;\n            }\n            .send-button, .stop-button, .replay-button {\n                padding: 6px 8px;\n                font-size: 12px;\n                max-width: 120px;\n            }\n            .chat-input input {\n                font-size: 14px;\n            }\n        }\n        @media (max-width: 400px) {\n            .menu a {\n                margin: 0 3px;\n                font-size: 11px;\n            }\n            .question-text {\n                font-size: 13px;\n            }\n            .question-box {\n                font-size: 13px;\n                max-height: 150px;\n            }\n            .chat-header h2 {\n                font-size: 14px;\n            }\n            .chat-messages {\n                max-height: 150px;\n            }\n            .message {\n                font-size: 12px;\n            }\n            .send-button, .stop-button, .replay-button {\n                padding: 5px 6px;\n                font-size: 11px;\n                max-width: 100px;\n            }\n            .chat-input input {\n                font-size: 12px;\n            }\n        }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"menu\">\n        <a href=\"https:\/\/phamho.com\/book\/2024\/09\/30\/chinese-vocabulary-family\/\">Vocabulary<\/a>\n        <a href=\"https:\/\/phamho.com\/book\/2024\/09\/30\/chinese-sentences-family\/\">Sentences<\/a>\n        <a href=\"https:\/\/phamho.com\/book\/2024\/09\/30\/chinese-yes-no-questions-family\/\">Yes\/No Questions<\/a>\n        <a href=\"https:\/\/phamho.com\/book\/2024\/09\/30\/chinese-likes-family\/\">Like Questions<\/a>\n        <a href=\"https:\/\/phamho.com\/book\/2024\/09\/30\/chinese-wh-questions-family\/\">WH Questions<\/a>    \n    <\/div>\n\n    <div class=\"container\">\n        <div class=\"image-container\">\n            <img decoding=\"async\" src=\"https:\/\/phamho.com\/book\/wp-content\/uploads\/2024\/09\/DALL\u00b7E-2024-09-15-18.17.33-A-classroom-scene-where-advanced-robots-are-teaching-English-to-B1-level-students.-The-robots-have-a-humanoid-design-with-sleek-metallic-bodies-and-f.webp\" alt=\"Lesson Robot\">\n            <div class=\"question-text\">Check the questions in this box<\/div>\n            <div id=\"question-box\" class=\"question-box\">\n                <!-- Learned family-related questions and answers will be displayed here -->\n            <\/div>\n        <\/div>\n        <div class=\"chat-container\">\n            <div class=\"chat-header\">  \n              <h2>Chinese Yes\/No Questions &#8211; Family<\/h2>\n            <\/div>\n            <div class=\"progress-container\">\n                <div id=\"progress-bar\" class=\"progress-bar\"><\/div>\n            <\/div>\n            <div class=\"chat-messages\" id=\"chat-messages\">\n                <!-- Messages will appear here -->\n            <\/div>\n            <div class=\"chat-input\">\n                <input type=\"text\" id=\"user-input\" placeholder=\"Type your answer here...\" style=\"display: none;\" \/>\n                <button id=\"submit-btn\" class=\"send-button\" style=\"display: none;\">Submit<\/button>\n                <button id=\"replay-btn\" class=\"replay-button\" style=\"display: none;\">Replay<\/button>\n                <button id=\"start-btn\" class=\"send-button\">Start Lesson<\/button>\n                <button id=\"stop-btn\" class=\"stop-button\">Stop<\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <script>\n    const questions = [\n        { question: \"\u6211\u6709\u4e00\u4e2a\u5927\u5bb6\u5ead\u5417\uff1f\", translation: \"Do I have a big family?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u7236\u4eb2\u5417\uff1f\", translation: \"Is this my father?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u6bcd\u4eb2\u5417\uff1f\", translation: \"Is this my mother?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u4e00\u4e2a\u54e5\u54e5\u5417\uff1f\", translation: \"Do I have an older brother?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u4e00\u4e2a\u59d0\u59d0\u5417\uff1f\", translation: \"Do I have an older sister?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u7237\u7237\u5417\uff1f\", translation: \"Is this my grandfather?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u5976\u5976\u5417\uff1f\", translation: \"Is this my grandmother?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u4e00\u4e2a\u513f\u5b50\u5417\uff1f\", translation: \"Do I have a son?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u4e00\u4e2a\u5973\u513f\u5417\uff1f\", translation: \"Do I have a daughter?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u53d4\u53d4\u5417\uff1f\", translation: \"Is this my uncle?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u963f\u59e8\u5417\uff1f\", translation: \"Is this my aunt?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u4e24\u4e2a\u5802\u5144\u5f1f\u5417\uff1f\", translation: \"Do I have two cousins (male)?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u4e00\u4e2a\u5802\u59d0\u59b9\u5417\uff1f\", translation: \"Do I have a cousin (female)?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u4e08\u592b\u5417\uff1f\", translation: \"Is this my husband?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u59bb\u5b50\u5417\uff1f\", translation: \"Is this my wife?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u7236\u6bcd\u5417\uff1f\", translation: \"Are these my parents?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u7956\u7236\u6bcd\u5417\uff1f\", translation: \"Are these my grandparents?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u6709\u5f88\u591a\u5144\u5f1f\u59d0\u59b9\u5417\uff1f\", translation: \"Do I have many siblings?\", answer: \"\u662f\u7684\" },\n        { question: \"\u6211\u7684\u5b69\u5b50\u5f88\u53ef\u7231\u5417\uff1f\", translation: \"Is my child cute?\", answer: \"\u662f\u7684\" },\n        { question: \"\u8fd9\u662f\u6211\u7684\u8868\u5144\u5f1f\u5417\uff1f\", translation: \"Is this my cousin?\", answer: \"\u662f\u7684\" }\n    ];\n\n    let currentQuestionIndex = 0;\n    let repeatAttempts = 0;\n    let score = 0;\n    let isSpeechRecognitionSupported = false;\n    let recognition;\n\n    \/\/ Updated stop keywords to include Chinese farewells\n    const stopKeywords = [\"\u518d\u89c1\", \"goodbye\", \"good bye\", \"bye\", \"bye bye\", \"byebye\", \"see you\", \"chao\"];\n    const speechSynthesisSupported = 'speechSynthesis' in window;\n\n    \/\/ Feature detection for Speech Recognition\n    if (window.SpeechRecognition || window.webkitSpeechRecognition) {\n        isSpeechRecognitionSupported = true;\n        recognition = new (window.SpeechRecognition || window.webkitSpeechRecognition)();\n        recognition.lang = 'zh-CN'; \/\/ Set to Mandarin Chinese\n        recognition.interimResults = false;\n        recognition.maxAlternatives = 1;\n    }\n\n    window.onload = function() {\n        if (speechSynthesisSupported) {\n            if (window.speechSynthesis.getVoices().length === 0) {\n                \/\/ Voices not loaded yet, wait for the event\n                window.speechSynthesis.onvoiceschanged = function() {\n                    greetUser();\n                };\n            } else {\n                \/\/ Voices already loaded\n                greetUser();\n            }\n        } else {\n            \/\/ Replace alert with in-page notification for better UX\n            displayNotification('Sorry, your browser does not support speech synthesis. Please use a compatible browser for the best experience.');\n            appendMessage('Speech synthesis not supported in your browser.', 'bot');\n        }\n\n        if (!isSpeechRecognitionSupported) {\n            \/\/ Show text input, submit button, and replay button\n            document.getElementById('user-input').style.display = 'block';\n            document.getElementById('submit-btn').style.display = 'block';\n            document.getElementById('replay-btn').style.display = 'block';\n        } else {\n            \/\/ Hide replay button initially as it's hidden by default\n            document.getElementById('replay-btn').style.display = 'none';\n        }\n    };\n\n    function greetUser() {\n        let greeting = \"Welcome! In this lesson, you will learn 20 simple yes or no questions about family in Chinese. I will ask each question, and you will answer with '\u662f\u7684' for 'Yes' or '\u4e0d\u662f' for 'No'.\";\n        if (!isSpeechRecognitionSupported) {\n            greeting += \" Your browser does not support voice input, so please type your responses in the text box below.\";\n        }\n        greeting += \" Are you ready? Click Start Lesson to begin.\";\n        appendMessage(greeting, 'bot');\n        sayText(greeting, 'en');\n    }\n\n    document.getElementById('start-btn').onclick = function() {\n        currentQuestionIndex = 0;\n        repeatAttempts = 0;\n        score = 0;\n        \/\/ Clear the question box when starting the lesson\n        clearQuestionBox();\n        updateProgress();\n        startQuestionLesson();\n    };\n\n    document.getElementById('stop-btn').onclick = function() {\n        endLesson(true); \/\/ Stop the lesson when \"Stop\" button is clicked\n    };\n\n    \/\/ Handle submit button click\n    document.getElementById('submit-btn').onclick = function() {\n        let userInput = document.getElementById('user-input').value.trim();\n        document.getElementById('user-input').value = '';\n        if (userInput) {\n            processUserResponse(userInput);\n        }\n    };\n\n    \/\/ Handle replay button click\n    document.getElementById('replay-btn').onclick = function() {\n        if (currentQuestionIndex < questions.length) {\n            const currentQuestion = questions[currentQuestionIndex].question;\n            sayText(currentQuestion, \"zh-CN\");\n        }\n    };\n\n    \/\/ Allow pressing 'Enter' to submit the answer\n    document.getElementById('user-input').addEventListener('keypress', function(event) {\n        if (event.key === 'Enter') {\n            event.preventDefault();\n            document.getElementById('submit-btn').click();\n        }\n    });\n\n    function startQuestionLesson() {\n        if (currentQuestionIndex < questions.length) {\n            const currentQuestion = questions[currentQuestionIndex].question;\n            const translation = questions[currentQuestionIndex].translation;\n\n            appendMessage(`'${currentQuestion}' - '${translation}'`, 'bot');\n            addQuestionToBox(currentQuestion, translation);\n            sayText(currentQuestion, \"zh-CN\", function() { \/\/ Speak the question in Chinese\n                setTimeout(() => {\n                    sayText(currentQuestion, \"zh-CN\", function() { \/\/ Repeat the question in Chinese\n                        setTimeout(() => {\n                            if (isSpeechRecognitionSupported) {\n                                \/\/ Prompt user to answer\n                                appendMessage(`Please answer with '\u662f\u7684' for 'Yes' or '\u4e0d\u662f' for 'No'.`, 'bot');\n                                \n                                \/\/ **Adjusted Instruction Speech Starts Here**\n                                \/\/ Split the instruction to speak '\u662f\u7684' and '\u4e0d\u662f' in Chinese\n                                sayText(\"Please answer with \", \"en\", function() {\n                                    sayText(\"'\u662f\u7684'\", \"zh-CN\", function() {\n                                        sayText(\" for 'Yes' or \", \"en\", function() {\n                                            sayText(\"'\u4e0d\u662f'\", \"zh-CN\", function() {\n                                                sayText(\" for 'No'.\", \"en\", function() {\n                                                    listenUserResponse();\n                                                });\n                                            });\n                                        });\n                                    });\n                                });\n                                \/\/ **Adjusted Instruction Speech Ends Here**\n                            } else {\n                                \/\/ Prompt user to type\n                                appendMessage(`Please type '\u662f\u7684' for 'Yes' or '\u4e0d\u662f' for 'No' in the text box below.`, 'bot');\n                                sayText(`Please type '\u662f\u7684' for 'Yes' or '\u4e0d\u662f' for 'No' in the text box below.`, \"en\");\n                                \/\/ Focus the text input\n                                document.getElementById('user-input').focus();\n                            }\n                        }, 500); \/\/ Small pause before prompt\n                    });\n                }, 500); \/\/ Small pause before second repetition\n            });\n        } else {\n            endLesson();\n        }\n    }\n\n    function listenUserResponse() {\n        recognition.start();\n\n        recognition.onresult = function(event) {\n            let userInput = event.results[0][0].transcript.trim();\n            appendMessage(userInput, 'user');\n\n            processUserResponse(userInput);\n        };\n\n        recognition.onspeechend = function() {\n            recognition.stop();\n        };\n\n        recognition.onerror = function(event) {\n            let errorMessage = '';\n            switch(event.error) {\n                case 'no-speech':\n                    errorMessage = 'No speech detected. Please try again or type your answer.';\n                    break;\n                case 'audio-capture':\n                    errorMessage = 'Microphone access denied. Please check your settings or type your answer.';\n                    break;\n                case 'not-allowed':\n                    errorMessage = 'Permission to use microphone denied.';\n                    break;\n                default:\n                    errorMessage = 'An error occurred: ' + event.error;\n            }\n            appendMessage(errorMessage, 'bot');\n            sayText(errorMessage, 'en');\n        };\n    }\n\n    function processUserResponse(userInput, expectedAnswer = questions[currentQuestionIndex].answer) {\n        appendMessage(userInput, 'user');\n\n        if (stopKeywords.includes(userInput)) { \/\/ Removed toLowerCase since Chinese is case-sensitive\n            endLesson(true); \/\/ User requested to stop the lesson\n            return;\n        }\n\n        if (userInput === expectedAnswer) { \/\/ Exact match for Chinese answers\n            const positiveMessage = \"Great! Your answer is correct.\";\n            appendMessage(positiveMessage, 'bot');\n            sayText(positiveMessage, 'en'); \/\/ Feedback in English\n            score += 1;\n            updateProgress();\n            repeatAttempts = 0; \/\/ Reset the attempts counter\n            currentQuestionIndex++;\n            setTimeout(startQuestionLesson, 2000); \/\/ Move to next question after 2 seconds\n        } else {\n            repeatAttempts++;\n            if (repeatAttempts < 2) {\n                const retryMessage = \"That's not correct. Please answer again with '\u662f\u7684' for 'Yes' or '\u4e0d\u662f' for 'No'.\";\n                appendMessage(retryMessage, 'bot');\n\n                \/\/ **Adjusted Retry Instruction Speech Starts Here**\n                sayText(\"That's not correct. Please answer again with \", \"en\", function() {\n                    sayText(\"'\u662f\u7684'\", \"zh-CN\", function() {\n                        sayText(\" for 'Yes' or \", \"en\", function() {\n                            sayText(\"'\u4e0d\u662f'\", \"zh-CN\", function() {\n                                sayText(\" for 'No'.\", \"en\", function() {\n                                    listenUserResponse();\n                                });\n                            });\n                        });\n                    });\n                });\n                \/\/ **Adjusted Retry Instruction Speech Ends Here**\n            } else {\n                \/\/ **Modified Section Starts Here**\n                const correctAnswerMessage = `You've tried twice. The correct answer is '${expectedAnswer}'. Let's move on to the next question.`;\n                appendMessage(correctAnswerMessage, 'bot');\n\n                \/\/ Sequentially speak the messages\n                sayText(\"You've tried twice. The correct answer is '\" + expectedAnswer + \"'.\", 'en', function() {\n                    sayText(expectedAnswer, 'zh-CN', function() { \/\/ Speak the answer in Chinese\n                        sayText(\"Let's move on to the next question.\", 'en', function() {\n                            \/\/ Proceed to next question after all speech has been completed\n                            repeatAttempts = 0; \/\/ Reset the attempts counter\n                            currentQuestionIndex++;\n                            setTimeout(startQuestionLesson, 2000); \/\/ Move to next question after 2 seconds\n                        });\n                    });\n                });\n                \/\/ **Modified Section Ends Here**\n            }\n        }\n    }\n\n    function addQuestionToBox(question, translation) {\n        const questionBox = document.getElementById('question-box');\n        const questionElement = document.createElement('div');\n        questionElement.innerText = `'${question}' - '${translation}'`;\n        questionBox.appendChild(questionElement);\n    }\n\n    function clearQuestionBox() {\n        const questionBox = document.getElementById('question-box');\n        questionBox.innerHTML = '';\n    }\n\n    function endLesson(userStopped = false) {\n        let message;\n        if (userStopped) {\n            message = \"Thank you for learning today! I hope you enjoyed the lesson.\";\n        } else {\n            message = `Well done! You've completed all 20 questions with a score of ${score} out of ${questions.length}. Keep practicing!`;\n        }\n        appendMessage(message, \"bot\");\n        sayText(message, \"en\"); \/\/ End feedback in English\n    }\n\n    function sayText(text, lang, callback) {\n        if (!speechSynthesisSupported) {\n            if (callback) callback();\n            return;\n        }\n        const utterance = new SpeechSynthesisUtterance(text);\n        utterance.lang = lang;\n        \/\/ Adjust rate and pitch for Mandarin Chinese\n        if (lang.startsWith('zh')) {\n            utterance.rate = 0.9;\n            utterance.pitch = 1.1;\n        } else {\n            utterance.rate = 1.0;\n            utterance.pitch = 1.0;\n        }\n        const voices = window.speechSynthesis.getVoices();\n        let selectedVoice = voices.find(voice => voice.lang === lang);\n        if (!selectedVoice) {\n            \/\/ Fallback to any voice that matches the language\n            selectedVoice = voices.find(voice => voice.lang.startsWith(lang));\n        }\n        if (selectedVoice) {\n            utterance.voice = selectedVoice;\n        }\n        utterance.onend = function() {\n            if (callback) callback();\n        };\n        window.speechSynthesis.speak(utterance);\n    }\n\n    function appendMessage(text, sender) {\n        const messageContainer = document.getElementById('chat-messages');\n        const messageElement = document.createElement('div');\n        messageElement.classList.add('message');\n        messageElement.classList.add(sender === 'bot' ? 'bot-message' : 'user-message');\n        messageElement.innerText = text;\n        messageContainer.appendChild(messageElement);\n        messageContainer.scrollTop = messageContainer.scrollHeight;\n    }\n\n    \/\/ Function to display in-page notifications\n    function displayNotification(message) {\n        \/\/ Create a notification div if it doesn't exist\n        let notification = document.getElementById('notification');\n        if (!notification) {\n            notification = document.createElement('div');\n            notification.id = 'notification';\n            notification.style.display = 'none';\n            notification.style.padding = '10px';\n            notification.style.backgroundColor = '#ffdddd';\n            notification.style.color = '#d8000c';\n            notification.style.margin = '10px';\n            document.body.insertBefore(notification, document.body.firstChild);\n        }\n        notification.innerText = message;\n        notification.style.display = 'block';\n    }\n\n    \/\/ Function to update progress bar\n    function updateProgress() {\n        const progressBar = document.getElementById('progress-bar');\n        const progressPercentage = (currentQuestionIndex \/ questions.length) * 100;\n        progressBar.style.width = `${progressPercentage}%`;\n    }\n    <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Chinese Yes\/No Questions &#8211; Family Vocabulary Sentences Yes\/No Questions Like Questions WH Questions Check the questions in this box Chinese Yes\/No Questions &#8211; Family Submit Replay Start Lesson Stop<\/p>\n","protected":false},"author":1,"featured_media":1362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,44,34],"tags":[],"class_list":["post-1739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chinese","category-family-chinese","category-robots"],"featured_image_src":"https:\/\/phamho.com\/book\/wp-content\/uploads\/2024\/06\/DALL\u00b7E-2024-06-07-14.16.52-Two-friendly-humanoid-robots-discussing-with-each-other.-Both-robots-have-a-sleek-modern-design-with-smooth-white-surfaces-and-gentle-curves.-Their-1024x585.webp","blog_images":{"medium":"https:\/\/phamho.com\/book\/wp-content\/uploads\/2024\/06\/DALL\u00b7E-2024-06-07-14.16.52-Two-friendly-humanoid-robots-discussing-with-each-other.-Both-robots-have-a-sleek-modern-design-with-smooth-white-surfaces-and-gentle-curves.-Their-300x171.webp","large":"https:\/\/phamho.com\/book\/wp-content\/uploads\/2024\/06\/DALL\u00b7E-2024-06-07-14.16.52-Two-friendly-humanoid-robots-discussing-with-each-other.-Both-robots-have-a-sleek-modern-design-with-smooth-white-surfaces-and-gentle-curves.-Their-1024x585.webp"},"ams_acf":[],"_links":{"self":[{"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/posts\/1739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/comments?post=1739"}],"version-history":[{"count":2,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/posts\/1739\/revisions"}],"predecessor-version":[{"id":1747,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/posts\/1739\/revisions\/1747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/media\/1362"}],"wp:attachment":[{"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/media?parent=1739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/categories?post=1739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phamho.com\/book\/wp-json\/wp\/v2\/tags?post=1739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}