<!-- wp:html --> <!DOCTYPE html> <html lang="hi"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>MCQ Quiz</title> <style> /* Basic CSS resets */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: Arial, sans-serif; background-color: #f1f8e9; color: #33691e; } .content-container { background-color: #dcedc8; padding: 5px; border-radius: 5px; max-width: auto; margin: 20px auto; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); position: relative; } .header { background-color: #7cb342; color: #ffffff; text-align: center; padding: 20px; border-radius: 10px; margin-bottom: 20px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); position: relative; } .header h1 { margin: 0; font-size: 28px; } /* Hamburger Menu Icon */ .hamburger { position: absolute; top: 8px; left: 8px; z-index: 1000; width: 20px; height: 15px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; } .hamburger-line { height: 3px; background-color: #fff; border-radius: 2px; } /* Sidebar (Question Nav) */ #questionNavOverlay { position: fixed; top: 0; left: -250px; /* hidden by default */ width: 250px; height: 100%; background-color: #fff; transition: left 0.3s ease-in-out; z-index: 2000; box-shadow: 2px 0 6px rgba(0,0,0,0.3); padding: 20px; overflow-y: auto; } #questionNavOverlay.show { left: 0; /* slide in */ } #questionNavTitle { margin-bottom: 10px; font-weight: bold; font-size: 1.1rem; } .question-nav { display: flex; flex-wrap: wrap; gap: 5px; } .circle-number { width: 30px; height: 30px; border-radius: 50%; background-color: #ccc; color: #000; display: flex; justify-content: center; align-items: center; cursor: pointer; user-select: none; /* Prevent text selection */ transition: background-color 0.2s; } .circle-number:hover { background-color: #aaa; } .circle-number.active { background-color: #4CAF50; color: #fff; } /* Quiz Container */ .quiz-container { background-color: #fff; border-radius: 10px; padding: 5px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); max-width: auto; width: 100%; margin: 0 auto; text-align: center; position: relative; } .question-counter { font-weight: bold; padding: 5px 10px; border-radius: 5px; background-color: #d9edf7; position: absolute; top: 10px; left: 10px; } /* Timer display */ .timer { font-weight: bold; padding: 5px 10px; border-radius: 5px; background-color: #ffcccb; position: absolute; top: 10px; right: 10px; } .question { font-size: 1.2rem; margin-top: 40px; margin-bottom: 20px; text-align: left; } .choices { display: flex; flex-direction: column; gap: 10px; } .choice { padding: 10px; background-color: #f0f0f0; border: 1px solid #ddd; border-radius: 5px; cursor: pointer; transition: background-color 0.3s, box-shadow 0.3s; } .choice:hover { background-color: #e0e0e0; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .choice.selected { background-color: #28a745; /* More vivid green */ color: #fff; } .choice.correct { background-color: #28a745; /* More vivid green */ border-color: #28a745; color: #fff; } .choice.incorrect { background-color: #dc3545; /* More vivid red */ border-color: #dc3545; color: #fff; } .choice.disabled { cursor: not-allowed; pointer-events: none; opacity: 0.6; } .explanation { margin-top: 20px; text-align: left; background-color: #e7f3fe; padding: 15px; border-left: 5px solid #2196F3; border-radius: 5px; } .buttons { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; } .btn { flex: 1 1 auto; padding: 8px 12px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 0.9rem; text-align: center; min-width: 100px; max-width: 150px; transition: none; } .btn.disabled { background-color: #cccccc; cursor: not-allowed; } .hidden { display: none; } /* Result Section */ #resultContent { text-align: center; margin-top: 20px; } .congrats { font-size: 1.5rem; color: #4CAF50; } .sad { font-size: 1.5rem; color: #d32f2f; } /* Popup Message (Optional) */ #popupMessage { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); color: white; padding: 10px 20px; border-radius: 5px; font-size: 1rem; z-index: 5000; display: none; } #popupMessage.show { display: block; } #popupMessage.correct { background-color: #28a745; } #popupMessage.incorrect { background-color: #dc3545; } </style> </head> <body> <div class="content-container"> <div class="header"> <!-- Hamburger menu button --> <div class="hamburger" id="hamburgerBtn"> <div class="hamburger-line"></div> <div class="hamburger-line"></div> <div class="hamburger-line"></div> </div> <h1 style="color: #ffffff;">MCQs Quiz</h1> </div> <!-- Sidebar (Question Nav) --> <div id="questionNavOverlay"> <div id="questionNavTitle">Questions</div> <div class="question-nav" id="questionNav"></div> </div> <!-- Quiz Container --> <div class="quiz-container" id="quizContent"> <div class="question-counter" id="questionCounter">1/3</div> <!-- Timer display here --> <div class="timer" id="timer">Time: 00:00</div> <div class="question" id="question">Loading question...</div> <div class="choices" id="choices"></div> <!-- Explanation and feedback --> <div class="explanation hidden" id="explanation"></div> <!-- Buttons for navigation and submission --> <div class="buttons"> <button class="btn" id="prevButton">Previous</button> <button class="btn" id="submitAnswerButton">Submit Answer</button> <button class="btn hidden" id="nextButton">Next</button> </div> </div> <!-- Result Section --> <div id="resultContent" class="hidden"> <h2>Quiz Completed</h2> <div id="resultMessage"></div> <p id="scoreMessage"></p> </div> </div> <!-- Optional Popup Message --> <div id="popupMessage" class="hidden"></div> <script> /***** JavaScript Code *****/ // Quiz data (sample) const quizData = [ { "question": "डेटा ट्रांसमिशन के तरीकों में से कौन सा एक सिंक्रोनस ट्रांसमिशन तरीका है?", "options": [ "सिरियल ट्रांसमिशन", "एसेन्क्रोनस ट्रांसमिशन", "सिंक्रोनस ट्रांसमिशन", "फुल डुप्लेक्स ट्रांसमिशन" ], "correct": 2, "explanation": "सिंक्रोनस ट्रांसमिशन में डेटा ट्रांसमिशन के लिए एक साझा क्लॉक सिग्नल का उपयोग किया जाता है, जिससे डेटा की सटीक समयबद्धता सुनिश्चित होती है।" }, { "question": "संचार माध्यम में किस प्रकार का माध्यम विद्युत संकेतों के लिए उपयुक्त नहीं है?", "options": [ "तारयुक्त (Wired)", "वायरलेस (Wireless)", "फाइबर ऑप्टिक", "अंधेरे में प्रकाश" ], "correct": 3, "explanation": "अंधेरे में प्रकाश संचार माध्यम विद्युत संकेतों के लिए उपयुक्त नहीं है। प्रकाश आधारित माध्यम जैसे फाइबर ऑप्टिक तेज और सुरक्षित डेटा ट्रांसमिशन के लिए उपयोग किए जाते हैं।" }, { "question": "किस नेटवर्क टोपोलॉजी में प्रत्येक नोड सीधे सभी अन्य नोड्स से जुड़ा होता है?", "options": [ "स्टार टोपोलॉजी", "रिंग टोपोलॉजी", "बस टोपोलॉजी", "मेष टोपोलॉजी" ], "correct": 3, "explanation": "मेष टोपोलॉजी में प्रत्येक नोड सीधे सभी अन्य नोड्स से जुड़ा होता है, जिससे उच्च स्तर की विश्वसनीयता और redundancy सुनिश्चित होती है।" }, { "question": "OSI मॉडल के किस लेयर में राउटर कार्य करता है?", "options": [ "फिजिकल लेयर", "डेटा लिंक लेयर", "नेटवर्क लेयर", "एप्लिकेशन लेयर" ], "correct": 2, "explanation": "राउटर OSI मॉडल के नेटवर्क लेयर (Layer 3) में कार्य करता है, जहाँ यह पैकेट्स को स्रोत से गंतव्य तक मार्गदर्शन करता है।" }, { "question": "TCP/IP प्रोटोकॉल में विश्वसनीय डेटा ट्रांसमिशन किस प्रोटोकॉल द्वारा सुनिश्चित किया जाता है?", "options": [ "UDP", "ICMP", "TCP", "IP" ], "correct": 2, "explanation": "TCP (Transmission Control Protocol) विश्वसनीय डेटा ट्रांसमिशन सुनिश्चित करता है, जिसमें डेटा की पुष्टि, क्रमबद्धता, और त्रुटि नियंत्रण शामिल हैं।" }, { "question": "डेटा एन्कोडिंग में, 'ASCII' किस प्रकार का कोडिंग सिस्टम है?", "options": [ "हैक्साडेसिमल", "बाइनरी", "सिंबल वेव", "सिंपल टेक्स्ट" ], "correct": 3, "explanation": "ASCII (American Standard Code for Information Interchange) एक सिंपल टेक्स्ट कोडिंग सिस्टम है जो अक्षरों, संख्याओं और विशेष प्रतीकों को बाइनरी में अनुवाद करता है।" }, { "question": "त्रुटि नियंत्रण में, 'CRC' किसका उपयोग करता है?", "options": [ "डेटा एन्कोडिंग", "डेटा ट्रांसमिशन", "त्रुटि डिटेक्शन", "नेटवर्क टोपोलॉजी" ], "correct": 2, "explanation": "CRC (Cyclic Redundancy Check) त्रुटि डिटेक्शन के लिए उपयोग किया जाता है, जो डेटा ट्रांसमिशन के दौरान किसी भी बाइट त्रुटि की पहचान करने में मदद करता है।" }, { "question": "संचार माध्यम में 'फाइबर ऑप्टिक केबल' के मुख्य लाभ क्या हैं?", "options": [ "कम लागत", "बढ़ी हुई बैंडविड्थ और कम सिग्नल डैम्पिंग", "विद्युत् हस्तक्षेप की अधिक संभावना", "कम डेटा ट्रांसमिशन रेट" ], "correct": 1, "explanation": "फाइबर ऑप्टिक केबल बढ़ी हुई बैंडविड्थ और कम सिग्नल डैम्पिंग प्रदान करती है, जिससे यह उच्च गति और लंबी दूरी के डेटा ट्रांसमिशन के लिए उपयुक्त होती है।" }, { "question": "किस प्रोटोकॉल का उपयोग ईमेल भेजने के लिए किया जाता है?", "options": [ "HTTP", "FTP", "SMTP", "SSH" ], "correct": 2, "explanation": "SMTP (Simple Mail Transfer Protocol) का उपयोग ईमेल भेजने के लिए किया जाता है। यह प्रोटोकॉल ईमेल सर्वर्स के बीच ईमेल संदेशों के ट्रांसमिशन को नियंत्रित करता है।" }, { "question": "डेटा ट्रांसमिशन के तरीकों में से कौन सा मल्टीपल बिट्स को एक साथ ट्रांसमिट करता है?", "options": [ "सिरियल ट्रांसमिशन", "पैरलल ट्रांसमिशन", "एसिंक्रोनस ट्रांसमिशन", "फुल डुप्लेक्स ट्रांसमिशन" ], "correct": 1, "explanation": "पैरलल ट्रांसमिशन में मल्टीपल बिट्स को एक साथ ट्रांसमिट किया जाता है, जिससे डेटा ट्रांसमिशन की गति बढ़ती है।" }, { "question": "OSI मॉडल के किस लेयर में डेटा पैकेट्स को विभाजित और पुनर्निर्मित किया जाता है?", "options": [ "फिजिकल लेयर", "डेटा लिंक लेयर", "नेटवर्क लेयर", "ट्रांसपोर्ट लेयर" ], "correct": 3, "explanation": "ट्रांसपोर्ट लेयर (Layer 4) में डेटा पैकेट्स को विभाजित और पुनर्निर्मित किया जाता है, जिससे डेटा ट्रांसमिशन की विश्वसनीयता और क्रमबद्धता सुनिश्चित होती है।" }, { "question": "UDP प्रोटोकॉल की विशेषता क्या है?", "options": [ "विश्वसनीयता", "फ्लो कंट्रोल", "कम ओवरहेड", "त्रुटि सुधार" ], "correct": 2, "explanation": "UDP (User Datagram Protocol) में कम ओवरहेड होता है और यह बिना कनेक्शन के डेटा ट्रांसमिशन प्रदान करता है, जिससे यह तेज लेकिन गैर-विश्वसनीय होता है।" }, { "question": "किस नेटवर्क टोपोलॉजी में डेटा केवल एक दिशा में प्रवाहित होता है?", "options": [ "स्टार टोपोलॉजी", "रिंग टोपोलॉजी", "मेष टोपोलॉजी", "बुस टोपोलॉजी" ], "correct": 1, "explanation": "रिंग टोपोलॉजी में डेटा केवल एक दिशा में प्रवाहित होता है, जिससे डेटा ट्रांसमिशन में नियमितता और पूर्वानुमान योग्यताएं सुनिश्चित होती हैं।" }, { "question": "किस प्रोटोकॉल का उपयोग वेब ब्राउज़िंग के लिए किया जाता है?", "options": [ "FTP", "SMTP", "HTTP", "SSH" ], "correct": 2, "explanation": "HTTP (HyperText Transfer Protocol) का उपयोग वेब ब्राउज़िंग के लिए किया जाता है। यह वेब सर्वर्स और क्लाइंट्स के बीच डेटा ट्रांसमिशन को नियंत्रित करता है।" }, { "question": "डेटा एन्कोडिंग में, 'Manchester Encoding' किसका उपयोग करता है?", "options": [ "सिंपल बाइनरी", "स्पेस शिफ्टिंग", "स्पेस टाइम शिफ्टिंग", "स्पेस बाइनरी" ], "correct": 2, "explanation": "Manchester Encoding में स्पेस टाइम शिफ्टिंग का उपयोग किया जाता है, जिसमें प्रत्येक बिट को दो सिग्नल सिग्नल में विभाजित किया जाता है, जिससे सिग्नल की क्लॉक सिग्नल के साथ सिंक्रोनाइजेशन सुनिश्चित होती है।" }, { "question": "त्रुटि नियंत्रण में, 'Parity Check' का क्या उपयोग है?", "options": [ "डेटा को एन्कोड करना", "डेटा ट्रांसमिशन में त्रुटियों की पहचान करना", "डेटा ट्रांसमिशन को तेज करना", "यूज़र इंटरफेस को स्टाइल करना" ], "correct": 1, "explanation": "Parity Check का उपयोग डेटा ट्रांसमिशन में त्रुटियों की पहचान करने के लिए किया जाता है। यह एक अतिरिक्त बिट जोड़ता है जिससे डेटा की बिट्स की संख्या विषम या सम होती है, जिससे त्रुटि की पहचान संभव होती है।" }, { "question": "संचार माध्यम में 'अंडरग्राउंड केबल' किसका उदाहरण है?", "options": [ "टेलीकम्युनिकेशन केबल", "फाइबर ऑप्टिक केबल", "टेलीफोन केबल", "Ethernet केबल" ], "correct": 0, "explanation": "अंडरग्राउंड केबल में टेलीकम्युनिकेशन केबल का उदाहरण है, जिसे जमीन के नीचे बिछाया जाता है ताकि डेटा ट्रांसमिशन सुरक्षित और अवरुद्ध रह सके।" }, { "question": "किस प्रोटोकॉल का उपयोग ईमेल प्राप्त करने के लिए किया जाता है?", "options": [ "SMTP", "IMAP", "FTP", "HTTP" ], "correct": 1, "explanation": "IMAP (Internet Message Access Protocol) का उपयोग ईमेल प्राप्त करने के लिए किया जाता है, जो यूज़र्स को सर्वर पर स्टोर ईमेल्स को एक्सेस करने की अनुमति देता है।" }, { "question": "डेटा ट्रांसमिशन में 'Half-Duplex' का क्या मतलब है?", "options": [ "डेटा एक समय में केवल एक दिशा में ट्रांसमिट हो सकता है", "डेटा एक समय में दोनों दिशाओं में ट्रांसमिट हो सकता है", "डेटा नहीं ट्रांसमिट होता", "डेटा ट्रांसमिशन की गति दो गुना होती है" ], "correct": 0, "explanation": "Half-Duplex में डेटा एक समय में केवल एक दिशा में ट्रांसमिट हो सकता है, जिससे दोनों दिशाओं में डेटा ट्रांसमिशन समयानुसार संभव होता है।" }, { "question": "संचार माध्यम में 'गुगल' क्या है?", "options": [ "स्ट्रिंग केबल", "रंगीन केबल", "ऑप्टिकल केबल", "खुला वातावरण" ], "correct": 3, "explanation": "यह प्रश्न स्पष्ट नहीं है क्योंकि 'गुगल' एक संचार माध्यम नहीं है। संभवतः टाइपो हुआ है। कृपया प्रश्न पुनः जांचें।" }, { "question": "त्रुटि नियंत्रण में, 'Automatic Repeat reQuest (ARQ)' का क्या कार्य है?", "options": [ "डेटा को एन्कोड करना", "त्रुटिपूर्ण डेटा को पुनः ट्रांसमिट करना", "डेटा को स्टोर करना", "यूज़र इंटरफेस को स्टाइल करना" ], "correct": 1, "explanation": "ARQ (Automatic Repeat reQuest) त्रुटिपूर्ण डेटा पैकेट्स को पुनः ट्रांसमिट करने की प्रक्रिया है, जिससे डेटा ट्रांसमिशन की विश्वसनीयता बढ़ती है।" }, { "question": "नेटवर्क टोपोलॉजी में 'फूल टोपोलॉजी' क्या है?", "options": [ "एक मुख्य नोड से सभी नोड्स जुड़े होते हैं", "नोड्स का एक वृत्ताकार लेआउट", "प्रत्येक नोड सीधे सभी अन्य नोड्स से जुड़ा होता है", "नोड्स का हाइब्रिड लेआउट" ], "correct": 3, "explanation": "फूल टोपोलॉजी एक हाइब्रिड लेआउट है जिसमें विभिन्न टोपोलॉजीज़ के तत्व शामिल होते हैं, जैसे स्टार, रिंग, और मेश, जिससे लचीलापन और विश्वसनीयता बढ़ती है।" }, { "question": "डेटा एन्कोडिंग में, 'NRZ' किसका संक्षेप है?", "options": [ "Non-Return to Zero", "Number Representation Zero", "Non-Random Zero", "Network Routing Zero" ], "correct": 0, "explanation": "NRZ का पूरा नाम 'Non-Return to Zero' है, जो एक सरल बाइनरी एन्कोडिंग तकनीक है जहाँ डेटा बाइट्स को बिना किसी रिसेट के निरंतर सिग्नल के रूप में ट्रांसमिट किया जाता है।" }, { "question": "प्रोटोकॉल्स और मानकों में, 'IEEE 802.11' किस प्रकार के नेटवर्क के लिए मानक है?", "options": [ "वायरलेस LAN", "वायर्ड LAN", "WAN", "MAN" ], "correct": 0, "explanation": "IEEE 802.11 वायरलेस LAN (Local Area Network) के लिए मानक है, जिसे वाई-फाई के नाम से भी जाना जाता है।" }, { "question": "डेटा ट्रांसमिशन में, 'Baud Rate' और 'Bit Rate' में क्या अंतर है?", "options": [ "Baud Rate और Bit Rate समान हैं", "Baud Rate प्रति सेकंड सिग्नल परिवर्तन की संख्या है, जबकि Bit Rate प्रति सेकंड ट्रांसमिट बिट्स की संख्या है", "Baud Rate अधिक तेज है", "Bit Rate अधिक तेज है" ], "correct": 1, "explanation": "Baud Rate प्रति सेकंड सिग्नल परिवर्तन की संख्या को दर्शाता है, जबकि Bit Rate प्रति सेकंड ट्रांसमिट बिट्स की संख्या को दर्शाता है। एक Baud Rate में कई बिट्स हो सकते हैं, इसलिए Bit Rate अक्सर Baud Rate से अधिक होता है।" }, { "question": "संचार माध्यम में 'Coaxial Cable' के मुख्य लाभ क्या हैं?", "options": [ "कम लागत और आसान इंस्टॉलेशन", "बढ़ी हुई बैंडविड्थ और कम विद्युत हस्तक्षेप", "बिना सिग्नल डैम्पिंग के लंबी दूरी तक डेटा ट्रांसमिशन", "सुपरफास्ट डेटा ट्रांसमिशन" ], "correct": 1, "explanation": "Coaxial Cable में बढ़ी हुई बैंडविड्थ और कम विद्युत हस्तक्षेप होते हैं, जिससे यह डेटा ट्रांसमिशन के लिए उपयुक्त होता है।" }, { "question": "प्रोटोकॉल्स और मानकों में, 'TCP' और 'UDP' में क्या मुख्य अंतर है?", "options": [ "TCP बिना कनेक्शन के काम करता है, UDP कनेक्शन-ओरिएंटेड है", "TCP कनेक्शन-ओरिएंटेड है और विश्वसनीयता प्रदान करता है, जबकि UDP बिना कनेक्शन के काम करता है और गैर-विश्वसनीय है", "UDP कनेक्शन-ओरिएंटेड है और विश्वसनीयता प्रदान करता है, जबकि TCP बिना कनेक्शन के काम करता है", "दोनों समान हैं" ], "correct": 1, "explanation": "TCP कनेक्शन-ओरिएंटेड है और डेटा ट्रांसमिशन की विश्वसनीयता सुनिश्चित करता है, जबकि UDP बिना कनेक्शन के काम करता है और गैर-विश्वसनीय है, जो तेज लेकिन कम सुरक्षित डेटा ट्रांसमिशन प्रदान करता है।" }, { "question": "डेटा ट्रांसमिशन के तरीकों में से कौन सा मल्टीपल सिग्नल लेनों का उपयोग करता है?", "options": [ "सिरियल ट्रांसमिशन", "पैरलल ट्रांसमिशन", "मल्टीपल एक्सेस", "फुल डुप्लेक्स ट्रांसमिशन" ], "correct": 1, "explanation": "पैरलल ट्रांसमिशन में मल्टीपल सिग्नल लेनों का उपयोग करके एक साथ कई बिट्स ट्रांसमिट किए जाते हैं, जिससे डेटा ट्रांसमिशन की गति बढ़ती है।" }, { "question": "त्रुटि नियंत्रण में, 'Hamming Code' किसका उपयोग करता है?", "options": [ "डेटा एन्कोडिंग", "डेटा ट्रांसमिशन", "त्रुटि डिटेक्शन और सुधार", "नेटवर्क टोपोलॉजी" ], "correct": 2, "explanation": "Hamming Code त्रुटि डिटेक्शन और सुधार के लिए उपयोग किया जाता है, जिससे एकल बिट त्रुटियों की पहचान और सुधार संभव होता है।" }, { "question": "संचार माध्यम में, 'Twisted Pair Cable' किस प्रकार का माध्यम है?", "options": [ "फाइबर ऑप्टिक", "वायरलेस", "तारयुक्त", "सेम्पल वेव" ], "correct": 2, "explanation": "Twisted Pair Cable एक तारयुक्त संचार माध्यम है, जिसमें दो तारों को ट्विस्ट करके विद्युत हस्तक्षेप को कम किया जाता है। यह आमतौर पर टेलीफोन और नेटवर्किंग में उपयोग किया जाता है।" }, { "question": "डेटा एन्कोडिंग में, 'NRZ-I' किस प्रकार का कोडिंग है?", "options": [ "Non-Return to Zero-Inverted", "Non-Return to Zero-Immediate", "New Return to Zero-Inverted", "New Return to Zero-Immediate" ], "correct": 0, "explanation": "NRZ-I (Non-Return to Zero-Inverted) एक कोडिंग तकनीक है जिसमें प्रत्येक बिट परिवर्तन पर सिग्नल की दिशा बदल जाती है, जबकि बिना बिट परिवर्तन के सिग्नल समान रहता है।" }, { "question": "नेटवर्क टोपोलॉजी में 'Bus Topology' की विशेषता क्या है?", "options": [ "प्रत्येक नोड सीधे एक केंद्रीय डिवाइस से जुड़ा होता है", "डेटा एक मुख्य केबल के माध्यम से सभी नोड्स में प्रवाहित होता है", "प्रत्येक नोड सभी अन्य नोड्स से जुड़ा होता है", "प्रत्येक नोड दो अन्य नोड्स से जुड़ा होता है" ], "correct": 1, "explanation": "Bus Topology में डेटा एक मुख्य केबल (बस) के माध्यम से सभी नोड्स में प्रवाहित होता है, जिससे एक सरल और किफायती नेटवर्क संरचना तैयार होती है।" }, { "question": "प्रोटोकॉल्स और मानकों में, 'Ethernet' किसके लिए एक मानक है?", "options": [ "वायरलेस नेटवर्क", "फाइबर ऑप्टिक नेटवर्क", "वायर्ड LAN", "वाइड एरिया नेटवर्क" ], "correct": 2, "explanation": "Ethernet एक मानक है जो वायर्ड LAN (Local Area Network) के लिए उपयोग किया जाता है, जो कंप्यूटर और अन्य डिवाइसों को एक साथ जोड़ने के लिए सबसे आम प्रोटोकॉल है।" }, { "question": "डेटा ट्रांसमिशन में, 'Asynchronous Transmission' का क्या मतलब है?", "options": [ "डेटा एक समय में एक ही दिशा में ट्रांसमिट होता है", "डेटा ट्रांसमिशन के लिए एक साझा क्लॉक का उपयोग किया जाता है", "डेटा ट्रांसमिशन बिना क्लॉक सिग्नल के होता है, हर बाइट के साथ स्टार्ट और स्टॉप बिट्स का उपयोग होता है", "डेटा ट्रांसमिशन दोनों दिशाओं में एक साथ होता है" ], "correct": 2, "explanation": "Asynchronous Transmission में डेटा ट्रांसमिशन बिना क्लॉक सिग्नल के होता है, और प्रत्येक बाइट के साथ स्टार्ट और स्टॉप बिट्स का उपयोग किया जाता है, जिससे डेटा की सही पहचान संभव होती है।" }, { "question": "त्रुटि नियंत्रण में, 'Checksum' का क्या कार्य है?", "options": [ "डेटा को एन्कोड करना", "डेटा ट्रांसमिशन की त्रुटियों की पहचान करना", "डेटा ट्रांसमिशन की गति बढ़ाना", "यूज़र इंटरफेस को स्टाइल करना" ], "correct": 1, "explanation": "Checksum का उपयोग डेटा ट्रांसमिशन की त्रुटियों की पहचान करने के लिए किया जाता है। यह डेटा के बिट्स का एक सरल योग होता है, जिसे रिसीवर द्वारा प्राप्त डेटा के साथ तुलना किया जाता है।" }, { "question": "नेटवर्क टोपोलॉजी में, 'Tree Topology' किस टोपोलॉजी का मिश्रण है?", "options": [ "स्टार और बस टोपोलॉजी", "मेश और रिंग टोपोलॉजी", "स्टार और रिंग टोपोलॉजी", "बस और मेश टोपोलॉजी" ], "correct": 0, "explanation": "Tree Topology स्टार और बस टोपोलॉजी का मिश्रण है, जिसमें कई स्टार नेटवर्क्स को एक मुख्य बस के माध्यम से जोड़ा जाता है। यह बड़े नेटवर्क्स के लिए उपयुक्त होता है।" }, { "question": "डेटा एन्कोडिंग में, '4B/5B Encoding' का क्या उपयोग है?", "options": [ "डेटा को कम्प्रेस करना", "डेटा को एन्कोड करना ताकि डेटा में कोई लंबा निरंतर 0 या 1 न हो", "डेटा को एन्कोड करना ताकि इसे आसानी से स्टोर किया जा सके", "डेटा को एन्कोड करना ताकि इसे जल्दी ट्रांसमिट किया जा सके" ], "correct": 1, "explanation": "4B/5B Encoding का उपयोग डेटा को एन्कोड करने के लिए किया जाता है ताकि डेटा में कोई लंबा निरंतर 0 या 1 न हो, जिससे सिग्नल की संतुलनता और सिंक्रोनाइजेशन बेहतर होती है।" }, { "question": "प्रोटोकॉल्स और मानकों में, 'IP' का पूरा नाम क्या है?", "options": [ "Internet Protocol", "Internal Protocol", "Information Protocol", "Internet Process" ], "correct": 0, "explanation": "IP का पूरा नाम 'Internet Protocol' है। यह नेटवर्क लेयर (Layer 3) में कार्य करता है और डेटा पैकेट्स को स्रोत से गंतव्य तक मार्गदर्शित करता है।" }, { "question": "संचार माध्यम में, 'Wireless Transmission' के मुख्य लाभ क्या हैं?", "options": [ "कम बैंडविड्थ", "लचीलापन और मोबाइलिटी", "उच्च लागत", "कम डेटा ट्रांसमिशन रेट" ], "correct": 1, "explanation": "Wireless Transmission में लचीलापन और मोबाइलिटी मुख्य लाभ हैं, क्योंकि यह बिना तार के डेटा ट्रांसमिट करने की सुविधा प्रदान करता है, जिससे उपयोगकर्ताओं को कहीं भी कनेक्ट होने की स्वतंत्रता मिलती है।" }, { "question": "डेटा ट्रांसमिशन में, 'Full-Duplex' का क्या मतलब है?", "options": [ "डेटा एक समय में केवल एक दिशा में ट्रांसमिट होता है", "डेटा एक समय में दोनों दिशाओं में ट्रांसमिट होता है", "डेटा ट्रांसमिशन न होता है", "डेटा ट्रांसमिशन की गति दो गुना होती है" ], "correct": 1, "explanation": "Full-Duplex में डेटा एक समय में दोनों दिशाओं में ट्रांसमिट होता है, जिससे संचार अधिक प्रभावी और तेज होता है।" }, { "question": "त्रुटि नियंत्रण में, 'FEC' का पूरा नाम क्या है और यह क्या करता है?", "options": [ "Forward Error Correction, डेटा में त्रुटियों को सुधारना", "Frequency Error Correction, सिग्नल की फ्रिक्वेंसी को ठीक करना", "Forward Encoding Control, डेटा एन्कोडिंग को नियंत्रित करना", "Full Error Control, सभी प्रकार की त्रुटियों को नियंत्रित करना" ], "correct": 0, "explanation": "FEC का पूरा नाम 'Forward Error Correction' है, और यह डेटा में त्रुटियों को सुधारने के लिए अतिरिक्त जानकारी जोड़ता है, जिससे रिसीवर त्रुटियों को पहचान कर उन्हें सुधार सकता है।" }, { "question": "प्रोटोकॉल्स और मानकों में, 'DHCP' का क्या उपयोग है?", "options": [ "ईमेल भेजना", "नेटवर्क पर IP एड्रेस असाइन करना", "डेटा ट्रांसमिशन", "सुरक्षा सुनिश्चित करना" ], "correct": 1, "explanation": "DHCP (Dynamic Host Configuration Protocol) का उपयोग नेटवर्क पर उपकरणों को स्वचालित रूप से IP एड्रेस असाइन करने के लिए किया जाता है, जिससे नेटवर्क एडमिनिस्ट्रेशन सरल होती है।" }, { "question": "डेटा एन्कोडिंग में, 'Manchester Encoding' किस तरह के डेटा ट्रांसमिशन के लिए उपयुक्त है?", "options": [ "ड्यूप्लेक्स", "सिंक्रोनस", "एसिंक्रोनस", "हाफ-ड्यूप्लेक्स" ], "correct": 1, "explanation": "Manchester Encoding सिंक्रोनस डेटा ट्रांसमिशन के लिए उपयुक्त है, क्योंकि इसमें प्रत्येक बिट के लिए एक सिग्नल परिवर्तन होता है, जिससे क्लॉक सिग्नल के साथ डेटा सिंक्रोनाइज होता है।" } // More questions as needed... ]; let currentQuestionIndex = 0; // Track current question let userAnswers = Array(quizData.length).fill(null); // Track user's answers // Timer variables let totalQuizTime = quizData.length * 30; // total seconds = 30 seconds * no. of questions let timeLeft = totalQuizTime; let timerInterval; // On page load, initialize quiz window.onload = function() { generateQuestionNav(); // Generate the question navigation circles loadQuestion(); startTimer(); // Start the countdown }; // Start the countdown timer function startTimer() { updateTimerDisplay(timeLeft); timerInterval = setInterval(() => { timeLeft--; updateTimerDisplay(timeLeft); if (timeLeft <= 0) { clearInterval(timerInterval); showResults(); // Force show results if time is up } }, 1000); } // Update timer on the screen in mm:ss format function updateTimerDisplay(seconds) { const timerEl = document.getElementById("timer"); const mins = Math.floor(seconds / 60).toString().padStart(2, '0'); const secs = (seconds % 60).toString().padStart(2, '0'); timerEl.innerText = `Time: ${mins}:${secs}`; } // Toggle the question nav when hamburger is pressed const hamburgerBtn = document.getElementById('hamburgerBtn'); hamburgerBtn.addEventListener('click', () => { document.getElementById('questionNavOverlay').classList.toggle('show'); }); // Close hamburger menu if user clicks outside the nav and menu document.addEventListener('click', (e) => { const navOverlay = document.getElementById('questionNavOverlay'); const hamburger = document.getElementById('hamburgerBtn'); // If the menu is open, and the click is outside both the overlay and the hamburger, close it if ( navOverlay.classList.contains('show') && !navOverlay.contains(e.target) && !hamburger.contains(e.target) ) { navOverlay.classList.remove('show'); } }); // Create small clickable circles for each question function generateQuestionNav() { const navContainer = document.getElementById("questionNav"); navContainer.innerHTML = ""; // clear old items if any quizData.forEach((_, index) => { const circle = document.createElement("div"); circle.classList.add("circle-number"); circle.innerText = index + 1; // Show question number (1-based) circle.onclick = () => jumpToQuestion(index); navContainer.appendChild(circle); }); } // Jump to a specific question function jumpToQuestion(qIndex) { currentQuestionIndex = qIndex; // Hide the nav on mobile after selection document.getElementById('questionNavOverlay').classList.remove('show'); // Reset submission/next button state document.getElementById("submitAnswerButton").classList.remove("hidden"); document.getElementById("nextButton").classList.add("hidden"); loadQuestion(); } // Load current question function loadQuestion() { highlightCurrentCircle(); // Hide explanation area and Next button initially document.getElementById("explanation").classList.add("hidden"); document.getElementById("nextButton").classList.add("hidden"); const questionData = quizData[currentQuestionIndex]; document.getElementById("question").innerText = questionData.question; document.getElementById("questionCounter").innerText = `${currentQuestionIndex + 1}/${quizData.length}`; // Clear old choices const choicesContainer = document.getElementById("choices"); choicesContainer.innerHTML = ""; // Populate choices questionData.options.forEach((option, index) => { const choiceElement = document.createElement("div"); choiceElement.className = "choice"; choiceElement.innerText = option; // If previously selected, mark it if (userAnswers[currentQuestionIndex] === index) { choiceElement.classList.add("selected"); } // On clicking a choice choiceElement.onclick = () => { // Clear all selections first document.querySelectorAll(".choice").forEach(c => c.classList.remove("selected")); // Mark this one as selected choiceElement.classList.add("selected"); userAnswers[currentQuestionIndex] = index; }; choicesContainer.appendChild(choiceElement); }); // Handle Previous button visibility document.getElementById("prevButton").style.display = currentQuestionIndex === 0 ? "none" : "inline-block"; } // Highlight the current question circle function highlightCurrentCircle() { const circles = document.querySelectorAll(".circle-number"); circles.forEach((circle, idx) => { circle.classList.remove("active"); if (idx === currentQuestionIndex) { circle.classList.add("active"); } }); } // Submit the current question's answer function submitAnswer() { const questionData = quizData[currentQuestionIndex]; const userAnswer = userAnswers[currentQuestionIndex]; // Show the explanation div const explanationDiv = document.getElementById("explanation"); explanationDiv.classList.remove("hidden"); // Clear previous correctness classes and disable further selection document.querySelectorAll(".choice").forEach((c) => { c.classList.add("disabled"); c.onclick = null; }); // Determine correctness or skipping if (userAnswer === null) { explanationDiv.innerHTML = "You Skipped the question.<br/><br/>व्याख्या: " + questionData.explanation; showPopupMessage("You Skipped the question", false); } else if (userAnswer === questionData.correct) { explanationDiv.innerHTML = "You got it right!<br/><br/>व्याख्या: " + questionData.explanation; showPopupMessage("You got it right", true); // Highlight correct choice document.querySelectorAll(".choice")[userAnswer].classList.add("correct"); } else { explanationDiv.innerHTML = "You got it wrong.<br/><br/>व्याख्या: " + questionData.explanation; showPopupMessage("You got it wrong", false); // Highlight correct choice document.querySelectorAll(".choice")[questionData.correct].classList.add("correct"); // Mark the chosen one as incorrect document.querySelectorAll(".choice")[userAnswer].classList.add("incorrect"); } // Hide the submit button, show the next button document.getElementById("submitAnswerButton").classList.add("hidden"); document.getElementById("nextButton").classList.remove("hidden"); } // Go to the next question or show final results function nextQuestion() { currentQuestionIndex++; if (currentQuestionIndex >= quizData.length) { // Show results if no more questions showResults(); } else { // Reset buttons document.getElementById("submitAnswerButton").classList.remove("hidden"); document.getElementById("nextButton").classList.add("hidden"); loadQuestion(); } } // Go to the previous question function previousQuestion() { if (currentQuestionIndex > 0) { currentQuestionIndex--; document.getElementById("submitAnswerButton").classList.remove("hidden"); document.getElementById("nextButton").classList.add("hidden"); loadQuestion(); } } // Show final quiz results function showResults() { // Stop the timer if it's still running clearInterval(timerInterval); // Calculate correct answers const correctAnswersCount = userAnswers.filter( (ans, i) => ans === quizData[i].correct ).length; // Hide quiz content document.getElementById("quizContent").classList.add("hidden"); // Show results document.getElementById("resultContent").classList.remove("hidden"); const percentage = (correctAnswersCount / quizData.length) * 100; let resultHTML = ""; if (percentage >= 60) { resultHTML = `<div class="congrats">🎉 बधाई हो! आपने ${percentage.toFixed( 2 )}% स्कोर किया है!</div>`; } else { resultHTML = `<div class="sad">😢 आपने ${percentage.toFixed( 2 )}% स्कोर किया है। अगली बार के लिए शुभकामनाएं!</div>`; } document.getElementById("resultMessage").innerHTML = resultHTML; document.getElementById("scoreMessage").innerText = `आपने कुल ${quizData.length} में से ${correctAnswersCount} प्रश्न सही उत्तर दिए हैं।`; } // Optional popup message function showPopupMessage(message, isCorrect) { const popup = document.getElementById('popupMessage'); popup.innerText = message; popup.className = ''; popup.classList.add('show'); popup.classList.add(isCorrect ? 'correct' : 'incorrect'); setTimeout(() => { popup.classList.remove('show'); popup.classList.add('hidden'); }, 2000); } // Button event listeners document.getElementById('prevButton').addEventListener('click', previousQuestion); document.getElementById('submitAnswerButton').addEventListener('click', submitAnswer); document.getElementById('nextButton').addEventListener('click', nextQuestion); // Predefined Darker Color Themes const themes = [ { header: '#a31645', headerText: '#ffffff', container: '#e8c4d6', containerText: '#6e0c36', headings: '#6e0c36' }, // Berry Delight { header: '#00574b', headerText: '#ffffff', container: '#b3dfd7', containerText: '#00382e', headings: '#00382e' }, // Ocean Breeze { header: '#c95a00', headerText: '#ffffff', container: '#dca865', containerText: '#7a3400', headings: '#7a3400' }, // Sunset Glow { header: '#4a0f6f', headerText: '#ffffff', container: '#cdb5e3', containerText: '#320b4a', headings: '#320b4a' }, // Calming Lavender { header: '#1e4d2b', headerText: '#ffffff', container: '#98c1a3', containerText: '#122417', headings: '#122417' }, // Forest Retreat { header: '#c99800', headerText: '#ffffff', container: '#e8d18a', containerText: '#6c4f00', headings: '#6c4f00' }, // Golden Elegance { header: '#01477e', headerText: '#ffffff', container: '#86b9e4', containerText: '#00223d', headings: '#00223d' }, // Sky Calm { header: '#5a3b2e', headerText: '#ffffff', container: '#b8a89c', containerText: '#32211a', headings: '#32211a' }, // Retro Rust { header: '#b34727', headerText: '#ffffff', container: '#f2c29d', containerText: '#6a2915', headings: '#6a2915' }, // Warm Peach { header: '#0f4c43', headerText: '#ffffff', container: '#92c3b8', containerText: '#072822', headings: '#072822' }, // Cool Mint ]; // Apply Random Darker Theme function applyRandomTheme() { const header = document.querySelector('.header'); const container = document.querySelector('.content-container'); const headings = document.querySelectorAll('.content-container h2'); // Select a random theme const randomTheme = themes[Math.floor(Math.random() * themes.length)]; // Apply Header Colors header.style.backgroundColor = randomTheme.header; header.style.color = randomTheme.headerText; // Apply Container Colors container.style.backgroundColor = randomTheme.container; container.style.color = randomTheme.containerText; // Apply Heading Colors headings.forEach((heading) => { heading.style.color = randomTheme.headings; heading.style.borderBottom = `2px solid ${randomTheme.headings}`; }); } // Apply the theme on page load window.onload = function () { applyRandomTheme(); // Set random theme generateQuestionNav(); // Generate question navigation loadQuestion(); // Load the first question startTimer(); // Start the countdown timer }; </script> </body> </html> <!-- /wp:html -->