विज्ञान MCQ क्विज़ | Science Bilingual Quiz - Practice Set 4 * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } body { background: linear-gradient(145deg, #eef2f7 0%, #d9e2ec 100%); padding: 0; min-height: 100vh; font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Noto Sans', system-ui, sans-serif; } .container { max-width: 100%; margin: 0 auto; padding: 0; } .quiz-header { background: linear-gradient(135deg, #0b2b5c, #102b47); color: white; padding: 16px 20px; border-radius: 0 0 28px 28px; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); margin-bottom: 12px; } .quiz-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.3px; background: linear-gradient(120deg, #ffffff, #e0f2fe); background-clip: text; -webkit-background-clip: text; color: transparent; } .quiz-header p { font-size: 0.8rem; opacity: 0.85; margin-top: 5px; } .quiz-content { padding: 8px 8px 12px 8px; } .quiz-card { background: rgba(255, 255, 255, 0.98); border-radius: 24px; padding: 18px 16px; margin-bottom: 16px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.15); transition: all 0.2s ease; border: 1px solid #ffffff80; width: 100%; } .question { font-size: 1rem; font-weight: 700; line-height: 1.45; margin-bottom: 18px; color: #0f2b3d; border-left: 5px solid #2c7da0; padding-left: 14px; background: #f9fafc; border-radius: 16px; word-break: break-word; } .option-label { display: flex; align-items: flex-start; gap: 12px; background: #f1f5f9; margin-bottom: 12px; padding: 14px 16px; border-radius: 60px; cursor: pointer; transition: all 0.2s; border: 1.5px solid transparent; font-weight: 500; touch-action: manipulation; width: 100%; } .option-label:active { background: #e2eafc; transform: scale(0.98); } input[type="radio"] { width: 22px; height: 22px; min-width: 22px; accent-color: #1e4a76; cursor: pointer; margin-top: 2px; } .option-text { font-size: 0.9rem; line-height: 1.4; flex: 1; word-break: break-word; } .explanation-box { margin-top: 16px; padding: 14px 16px; background: #fef3c7; border-left: 5px solid #f59e0b; border-radius: 16px; display: none; font-size: 0.85rem; line-height: 1.5; color: #78350f; } .explanation-box.show { display: block; animation: fadeIn 0.3s ease; } .explanation-title { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; } .explanation-title i { color: #f59e0b; } .explanation-text { font-size: 0.85rem; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } } .submit-btn { background: linear-gradient(95deg, #1f6392, #0f3b60); border: none; color: white; font-size: 1.2rem; font-weight: bold; padding: 18px 20px; border-radius: 60px; cursor: pointer; width: 100%; transition: 0.2s; margin: 8px 0 20px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2); letter-spacing: 0.5px; touch-action: manipulation; } .submit-btn:active { transform: scale(0.97); } .result { background: #dcfce8; border-left: 10px solid #15803d; padding: 18px 16px; border-radius: 28px; font-size: 1.15rem; font-weight: bold; text-align: center; margin: 12px 0 20px; display: none; box-shadow: 0 6px 14px rgba(0,0,0,0.1); word-break: break-word; line-height: 1.5; } .correct-highlight { background: #bbf7d0 !important; border-color: #15803d !important; } .wrong-highlight { background: #ffe4e2 !important; border-color: #dc2626 !important; } ::-webkit-scrollbar { width: 3px; } button, .option-label { -webkit-tap-highlight-color: rgba(59,130,246,0.2); } @media (max-width: 600px) { .quiz-content { padding: 6px 6px 10px 6px; } .quiz-header { padding: 14px 16px; } .quiz-header h1 { font-size: 1.3rem; } .quiz-card { padding: 16px 14px; margin-bottom: 14px; } .question { font-size: 0.95rem; padding-left: 12px; } .option-label { padding: 12px 14px; gap: 10px; } .option-text { font-size: 0.87rem; } .explanation-box { padding: 12px 14px; font-size: 0.8rem; } .submit-btn { font-size: 1.1rem; padding: 16px; } } @media (max-width: 380px) { .option-text { font-size: 0.82rem; } .question { font-size: 0.9rem; } } 🔬 विज्ञान MCQ क्विज़ | Science Bilingual Quiz Practice Set 4 | 25 प्रश्न | प्रत्येक प्रश्न के बाद व्याख्या | 25 Questions with Explanations ✅ Submit Quiz / जमा करें // 25 BILINGUAL QUESTIONS - Practice Set 4 with Explanations const questionsData = [ { qText: "विद्युत धारा की एसआई (SI) इकाई क्या है? / What is the SI unit of electric current?", opts: ["(a) वोल्ट / Volt", "(b) कूलॉम / Coulomb", "(c) एम्पीयर / Ampere", "(d) ओम / Ohm"], ans: "C", explanation: "विद्युत धारा का SI मात्रक एम्पीयर (Ampere) होता है, जिसे 'A' प्रतीक से दर्शाया जाता है। / The SI unit of electric current is Ampere (A)." }, { qText: "सार्वत्रिक गुरुत्वाकर्षण नियतांक (G) का मान क्या होता है? / What is the value of the universal gravitational constant (G)?", opts: ["(a) 6.6734 × 10⁻¹¹ N m/kg", "(b) 6.6734 × 10¹¹ N m²/kg²", "(c) 9.8 m/s²", "(d) 6.6734 × 10⁻¹¹ N m²/kg²"], ans: "D", explanation: "सार्वत्रिक गुरुत्वाकर्षण स्थिरांक G का मान 6.6734 × 10⁻¹¹ N m²/kg² होता है। हेनरी कैवेंडिश ने सबसे पहले इसका मान ज्ञात किया था। / The value of gravitational constant G is 6.6734 × 10⁻¹¹ N m²/kg²." }, { qText: "उत्तल दर्पण (Convex Mirror) का मुख्य फोकस कहाँ स्थित होता है? / The principal focus of a convex mirror is located _______", opts: ["(a) दर्पण के पीछे / Behind the mirror", "(b) मुख्य अक्ष के ऊपर / Above the principal axis", "(c) दर्पण के सामने / In front of the mirror", "(d) मुख्य अक्ष के नीचे / Below the principal axis"], ans: "A", explanation: "उत्तल दर्पण में परावर्तित किरणें पीछे की ओर बढ़ाने पर एक बिंदु पर मिलती हुई प्रतीत होती हैं, इसलिए इसका मुख्य फोकस दर्पण के पीछे (Behind the mirror) होता है। / The principal focus of a convex mirror is virtual and located behind the mirror." }, { qText: "हीरे का निरपेक्ष अपवर्तनांक (Absolute Refractive Index) कितना होता है? / The absolute refractive index of diamond is _______", opts: ["(a) 2.32", "(b) 2.42", "(c) 1.33", "(d) 1.50"], ans: "B", explanation: "हीरे का अपवर्तनांक सबसे अधिक यानी 2.42 होता है, जिसके कारण इसमें पूर्ण आंतरिक परावर्तन होता है और यह चमकता है। / The absolute refractive index of diamond is 2.42, which is exceptionally high." }, { qText: "17 V के विभवांतर वाले दो बिंदुओं के बीच 5 C के आवेश को स्थानांतरित करने में कितना कार्य किया जाता है? / How much work is done in moving 5 C charge through 17 V potential difference?", opts: ["(a) 75 J", "(b) 3.4 J", "(c) 85 J", "(d) 22 J"], ans: "C", explanation: "कार्य (W) = आवेश (Q) × विभवांतर (V) = 5 C × 17 V = 85 जूल (J)। / Work done = Charge × Potential difference = 5 C × 17 V = 85 Joules." }, { qText: "निम्नलिखित में से किसकी एसआई (SI) इकाई 'ओम' (Ohm) है? / The SI unit of _______ is Ohm.", opts: ["(a) विद्युत धारा / Electric current", "(b) विभवांतर / Potential difference", "(c) विद्युत आवेश / Electric charge", "(d) प्रतिरोध / Resistance"], ans: "D", explanation: "विद्युत प्रतिरोध (Resistance) का SI मात्रक ओम (Ω) होता है। ओम के नियम के अनुसार R = V/I होता है। / The SI unit of electrical resistance is Ohm (Ω)." }, { qText: "विद्युत बल्ब के फिलामेंट के निर्माण के लिए विशेष रूप से किस धातु का उपयोग किया जाता है? / Which metal is commonly used for the filament of an electric bulb?", opts: ["(a) टंगस्टन / Tungsten", "(b) तांबा / Copper", "(c) एल्युमिनियम / Aluminium", "(d) लोहा / Iron"], ans: "A", explanation: "विद्युत बल्ब के फिलामेंट के लिए टंगस्टन धातु का उपयोग किया जाता है क्योंकि इसका गलनांक (Melting Point) अत्यधिक उच्च (लगभग 3422°C) होता है। / Tungsten is used for bulb filaments because of its extremely high melting point." }, { qText: "निम्नलिखित में से कौन सा विकल्प सही सुमेलित नहीं है? / Which of the following pairs is NOT correctly matched?", opts: ["(a) पेनिसिलिन : अलेक्जेंडर फ्लेमिंग / Penicillin : Alexander Fleming", "(b) विद्युत बल्ब : बेंजामिन फ्रैंकलिन / Electric bulb : Benjamin Franklin", "(c) चेचक का टीका : एडवर्ड जेनर / Smallpox Vaccine : Edward Jenner", "(d) टेलीफोन : अलेक्जेंडर ग्राहम बेल / Telephone : Alexander Graham Bell"], ans: "B", explanation: "विद्युत बल्ब का सफल आविष्कार थॉमस अल्वा एडिसन ने किया था, न कि बेंजामिन फ्रैंकलिन ने। फ्रैंकलिन बिजली और तड़ित चालक की खोज से जुड़े थे। / Electric bulb was invented by Thomas Alva Edison, not Benjamin Franklin." }, { qText: "कोशिका के भीतर राइबोसोम (Ribosomes) मुख्य रूप से किसका निर्माण करते हैं? / Within a cell, ribosomes are primarily responsible for synthesizing _______", opts: ["(a) वसा / Fats", "(b) लिपिड / Lipids", "(c) प्रोटीन / Proteins", "(d) स्टार्च / Starch"], ans: "C", explanation: "राइबोसोम को कोशिका की 'प्रोटीन फैक्ट्री' कहा जाता है क्योंकि ये अमीनो एसिड से प्रोटीन का संश्लेषण (Synthesis) करते हैं। / Ribosomes serve as the site of protein synthesis in the cell." }, { qText: "दूध को दही (Curd) में बदलने के लिए कौन सा बैक्टीरिया (जीवाणु) जिम्मेदार होता है? / Which bacteria is responsible for converting milk into curd?", opts: ["(a) स्ट्रेप्टोमाइसिन / Streptomyces", "(b) विब्रियो / Vibrio", "(c) लैक्टोबैसिलस / Lactobacillus", "(d) स्पाइरिला / Spirilla"], ans: "C", explanation: "लैक्टोबैसिलस (Lactobacillus) बैक्टीरिया दूध में मौजूद लैक्टोज शर्करा को लैक्टिक अम्ल में बदल देता है, जिससे दूध दही में जम जाता है। / Lactobacillus bacteria converts lactose sugar into lactic acid, turning milk into curd." }, { qText: "कौन सी रक्त कोशिकाएं रक्त के थक्के जमने (Blood Clotting) और रक्तस्राव को रोकने में सहायक होती हैं? / Which blood cells help in blood clotting and stopping bleeding?", opts: ["(a) श्वेत रक्त कणिकाएं / White blood cells", "(b) लाल रक्त कणिकाएं / Red blood cells", "(c) प्लाज्मा / Plasma", "(d) प्लेटलेट्स (बिंबाणु) / Platelets"], ans: "D", explanation: "प्लेटलेट्स (Platelets) चोट लगने पर रक्त का थक्का (Clot) बनाने में मदद करते हैं, जिससे शरीर से अत्यधिक खून बहना रुक जाता है। / Platelets play a critical role in coagulation (blood clotting) to prevent excessive bleeding." }, { qText: "मानव मस्तिष्क के सबसे बड़े भाग प्रमस्तिष्क (Cerebrum) के बारे में कौन सा कथन सही है? / Which statement about the largest part of human brain, the Cerebrum, is correct?", opts: ["(a) यह मस्तिष्क के पिछले निचले हिस्से में स्थित होता है / It is located at the back lower part of the brain", "(b) यह सोचने, याद रखने, बुद्धिमत्ता और स्वैच्छिक क्रियाओं को नियंत्रित करता है / It controls thinking, memory, intelligence, and voluntary actions", "(c) यह शरीर का संतुलन बनाए रखता है / It maintains bodily posture and balance", "(d) यह केवल अनैच्छिक क्रियाओं को नियंत्रित करता है / It only controls involuntary actions"], ans: "B", explanation: "सेरेब्रम (प्रमस्तिष्क) मस्तिष्क का सबसे विकसित और बड़ा भाग है। यह बुद्धिमत्ता, तर्क, स्मृति, सोच और संवेदी अनुभवों का केंद्र है। संतुलन का कार्य सेरेबेलम (अनुमस्तिष्क) करता है। / The Cerebrum is responsible for complex functions like thinking, reasoning, learning, and memory." }, { qText: "निम्नलिखित में से कौन सा पेय या खाद्य पदार्थ अपने आप में एक संपूर्ण/संतुलित आहार (Balanced Diet) माना जाता है? / Which of the following is considered a complete/balanced diet in itself?", opts: ["(a) फलों का रस / Fruit juice", "(b) शहद / Honey", "(c) केवल दालें / Pulses only", "(d) दूध / Milk"], ans: "D", explanation: "दूध को एक संपूर्ण आहार माना जाता है क्योंकि इसमें कार्बोहाइड्रेट, वसा, प्रोटीन, विटामिन और खनिज (विटामिन C और आयरन को छोड़कर) पर्याप्त मात्रा में पाए जाते हैं। / Milk is highly nutritious and contains almost all essential nutrients, often referred to as a complete food." }, { qText: "निम्नलिखित में से कौन सा रोग एक गैर-संचारी रोग (Non-communicable Disease) का उदाहरण है? / Which of the following is an example of a non-communicable disease?", opts: ["(a) हैजा / Cholera", "(b) टाइफाइड / Typhoid", "(c) मधुमेह (डायबिटीज) / Diabetes", "(d) तपेदिक (टीबी) / Tuberculosis"], ans: "C", explanation: "मधुमेह (Diabetes) एक चयापचय संबंधी विकार (Metabolic Disorder) है जो इंसुलिन की कमी से होता है। यह एक व्यक्ति से दूसरे में नहीं फैलता। बाकी सभी संक्रामक रोग हैं। / Diabetes is a chronic, non-communicable metabolic lifestyle disease." }, { qText: "टेरिडोफाइटा (Pteridophyta) समूह के पौधों की क्या मुख्य विशेषता होती है? / What is the main characteristic of plants belonging to the Pteridophyta division?", opts: ["(a) ये बीज पैदा करने वाले फूलदार पौधे होते हैं / They are flowering plants that produce seeds", "(b) ये बीज-रहित और बिना संवहन ऊतक वाले पौधे हैं / They are seedless plants without vascular tissues", "(c) ये बीज-रहित संवहनी पौधे (जाइलम और फ्लोएम युक्त) होते हैं / They are seedless vascular plants (containing xylem and phloem)", "(d) ये पूरी तरह से परजीवी पौधे होते हैं / They are completely parasitic plants"], ans: "C", explanation: "टेरिडोफाइटा वर्ग के पौधों में फूल और बीज नहीं बनते (क्रिप्टोगेम), लेकिन इनमें जल और भोजन के परिवहन के लिए संवहन ऊतक (Vascular tissues) विकसित होते हैं। / Pteridophytes are vascular cryptogams, meaning they possess vascular tissue but do not produce seeds or flowers." }, { qText: "पौधों के वायवीय भागों (मुख्यतः पत्तियों) से वाष्प के रूप में जल की हानि को क्या कहा जाता है? / The loss of water from the aerial parts of plants in the form of water vapor is called _______", opts: ["(a) वाष्पोत्सर्जन / Transpiration", "(b) श्वसन / Respiration", "(c) प्रकाश संश्लेषण / Photosynthesis", "(d) संघनन / Condensation"], ans: "A", explanation: "पौधों की पत्तियों पर मौजूद रंध्रों (Stomata) के माध्यम से अतिरिक्त पानी का वाष्प बनकर उड़ना वाष्पोत्सर्जन (Transpiration) कहलाता है। / The elimination of excess water from plant surfaces in the form of vapor is called transpiration." }, { qText: "निम्नलिखित में से कौन सा एक कोशिकीय जीव बहु-विखंडन (Multiple Fission) प्रदर्शित करता है? / Which of the following organisms reproduces via multiple fission?", opts: ["(a) यीस्ट / Yeast", "(b) हाइड्रा / Hydra", "(c) प्लाज्मोडियम / Plasmodium", "(d) प्लेनेरिया / Planaria"], ans: "C", explanation: "मलेरिया परजीवी प्लाज्मोडियम (Plasmodium) प्रतिकूल परिस्थितियों में एक साथ कई संतति कोशिकाओं में विभाजित होता है, जिसे बहु-विखंडन कहते हैं। हाइड्रा और यीस्ट में मुकुलन (Budding) होता है। / Plasmodium reproduces through multiple fission, where a single cell divides into many daughter cells simultaneously." }, { qText: "आलू का वैज्ञानिक या वानस्पतिक नाम (Scientific Name) क्या है? / What is the scientific or botanical name of Potato?", opts: ["(a) सोलेनम ट्यूबरोसम / Solanum tuberosum", "(b) अज़ादिरचता इंडिका / Azadirachta indica", "(c) मंजीफेरा इंडिका / Mangifera indica", "(d) एलियम सेपा / Allium cepa"], ans: "A", explanation: "आलू का वानस्पतिक नाम सोलेनम ट्यूबरोसम (Solanum tuberosum) है। अज़ादिरचता नीम का और मंजीफेरा आम का वैज्ञानिक नाम है। / The scientific name of potato is Solanum tuberosum. It belongs to the Solanaceae family." }, { qText: "निम्नलिखित में से कौन सा पदार्थ एक रासायनिक यौगिक (Compound) नहीं है? / Which of the following substances is NOT a chemical compound?", opts: ["(a) लेड (सीसा) / Lead", "(b) चॉक (कैल्शियम कार्बोनेट) / Chalk", "(c) हाइड्रोजन सल्फाइड / Hydrogen sulfide", "(d) कार्बन डाइऑक्साइड / Carbon dioxide"], ans: "A", explanation: "लेड (Lead - Pb) आवर्त सारणी का एक शुद्ध तत्व (Element) है, यौगिक नहीं। चॉक ($Na_2CO_3$ या $CaCO_3$), $H_2S$ और $CO_2$ सभी यौगिक हैं। / Lead is a pure chemical element (Pb), whereas others are compounds made of different elements bonded together." }, { qText: "रासायनिक प्रतीकों (Chemical Symbols) के संदर्भ में किस तत्व के प्रतीक में दो अक्षर शामिल होते हैं? / With reference to chemical symbols, which element's symbol consists of two letters?", opts: ["(a) कार्बन / Carbon", "(b) आयोडीन / Iodine", "(c) लोहा / Iron", "(d) फ्लोरीन / Fluorine"], ans: "C", explanation: "लोहे (Iron) का प्रतीक 'Fe' (लैटिन नाम फेरम से) होता है जिसमें दो अक्षर हैं। कार्बन का 'C', आयोडीन का 'I' और फ्लोरीन का 'F' होता है जो एकल अक्षर हैं। / Iron has the chemical symbol 'Fe' which consists of two letters, while Carbon (C), Iodine (I), and Fluorine (F) use a single letter." }, { qText: "सल्फ्यूरिक अम्ल ($H_2SO_4$) का आणविक द्रव्यमान (Molecular Mass) कितना होता है? (H=1, S=32, O=16) / What is the molecular mass of Sulfuric Acid ($H_2SO_4$)?", opts: ["(a) 99 u", "(b) 96 u", "(c) 49 u", "(d) 98 u"], ans: "D", explanation: "$H_2SO_4$ का आणविक द्रव्यमान = $(2 \\times 1) + 32 + (4 \\times 16) = 2 + 32 + 64 = 98 \\text{ u}$ होता है। / The molecular mass of $H_2SO_4$ is calculated as $(2 \\times 1) + 32 + (4 \\times 16) = 98 \\text{ u}$." }, { qText: "एक तत्व का इलेक्ट्रॉनिक विन्यास 2, 8, 4 है। आवर्त सारणी में इस तत्व का नाम क्या है? / The electronic configuration of an element is 2, 8, 4. What is the name of this element?", opts: ["(a) मैग्नीशियम / Magnesium", "(b) सिलिकॉन / Silicon", "(c) कैल्सियम / Calcium", "(d) सोडियम / Sodium"], ans: "B", explanation: "कुल इलेक्ट्रॉनों की संख्या = $2 + 8 + 4 = 14$ है। परमाणु क्रमांक 14 सिलिकॉन (Si) का होता है, जो समूह 14 का उपधातु है। / The configuration 2, 8, 4 sums up to 14 electrons, which corresponds to Silicon (Si)." }, { qText: "विद्युत संयोजी (आयनिक) यौगिक मुख्य रूप से किस अवस्था में विद्युत का चालन करते हैं? / Electrovalent (Ionic) compounds conduct electricity primarily in which state?", opts: ["(a) शुष्क ठोस अवस्था / Solid state", "(b) केवल गैसीय अवस्था / Gaseous state only", "(c) गलित या जलीय अवस्था / Molten or aqueous state", "(d) अत्यधिक ठंडी अवस्था / Deep frozen state"], ans: "C", explanation: "आयनिक यौगिक ठोस अवस्था में मजबूत स्थिरवैद्युत बलों के कारण विद्युत का चालन नहीं करते, लेकिन गलित (Molten) या जलीय विलयन में मुक्त आयनों की उपस्थिति के कारण बिजली का चालन करते हैं। / Ionic compounds conduct electricity in molten or aqueous states due to the presence of free-moving ions." }, { qText: "वॉशिंग सोडा (धावन सोडा) रासायनिक और जलीय प्रकृति के रूप में क्या है? / What is washing soda in terms of chemical and aqueous nature?", opts: ["(a) एक अम्लीय लवण / An acidic salt", "(b) एक उदासीन पदार्थ / A neutral substance", "(c) एक साधारण अम्ल / A simple acid", "(d) एक क्षारीय लवण / A basic salt"], ans: "D", explanation: "वॉशिंग सोडा ($Na_2CO_3$) एक क्षारीय लवण (Basic salt) है क्योंकि इसका निर्माण प्रबल क्षार (NaOH) और दुर्बल अम्ल ($H_2CO_3$) की क्रिया से होता है। इसका जलीय विलयन लाल लिटमस को नीला कर देता है। / Washing soda is chemically a basic salt because it yields an alkaline solution when dissolved in water." }, { qText: "निम्नलिखित में से उस धातु का चयन करें जिसे चाकू से आसानी से काटा जा सकता है? / Select the metal from the following that can be easily cut with a knife?", opts: ["(a) सोडियम / Sodium", "(b) तांबा / Copper", "(c) सोना / Gold", "(d) एल्युमिनियम / Aluminium"], ans: "A", explanation: "सोडियम (Na) और पोटैशियम (K) अत्यधिक मुलायम क्षार धातुएं हैं जिनका घनत्व कम होता है और इन्हें चाकू से आसानी से काटा जा सकता है। / Sodium is a highly reactive alkali metal that is soft enough to be sliced with a knife." } ]; // DOM elements const questionsPanel = document.getElementById("questionsPanel"); function buildQuiz() { questionsPanel.innerHTML = ""; questionsData.forEach((q, idx) => { const qNumber = idx + 1; const card = document.createElement("div"); card.className = "quiz-card"; const questionDiv = document.createElement("div"); questionDiv.className = "question"; questionDiv.innerText = `${qNumber}. ${q.qText}`; card.appendChild(questionDiv); const optionsDiv = document.createElement("div"); optionsDiv.className = "options-wrapper"; const letters = ["A", "B", "C", "D"]; q.opts.forEach((optText, optIdx) => { const letterVal = letters[optIdx]; const label = document.createElement("label"); label.className = "option-label"; const radio = document.createElement("input"); radio.type = "radio"; radio.name = `q_${idx}`; radio.value = letterVal; const span = document.createElement("span"); span.className = "option-text"; span.innerText = optText; label.appendChild(radio); label.appendChild(span); optionsDiv.appendChild(label); }); card.appendChild(optionsDiv); const explanationBox = document.createElement("div"); explanationBox.className = "explanation-box"; explanationBox.id = `explanation_${idx}`; explanationBox.innerHTML = ` Explanation / व्याख्या: ${q.explanation} `; card.appendChild(explanationBox); questionsPanel.appendChild(card); }); } function submitQuizEvaluation() { let score = 0; const totalQ = questionsData.length; const allLabels = document.querySelectorAll(".option-label"); allLabels.forEach(label => { label.classList.remove("correct-highlight", "wrong-highlight"); }); for (let i = 0; i < totalQ; i++) { const expBox = document.getElementById(`explanation_${i}`); if (expBox) expBox.classList.remove("show"); } for (let i = 0; i < totalQ; i++) { const correctLetter = questionsData[i].ans; const selectedRadio = document.querySelector(`input[name="q_${i}"]:checked`); const allRadios = document.querySelectorAll(`input[name="q_${i}"]`); allRadios.forEach(radio => { const parentLabel = radio.parentElement; if (radio.value === correctLetter) { parentLabel.classList.add("correct-highlight"); } if (selectedRadio && radio.checked && radio.value !== correctLetter) { parentLabel.classList.add("wrong-highlight"); } }); const expBox = document.getElementById(`explanation_${i}`); if (expBox) expBox.classList.add("show"); if (selectedRadio && selectedRadio.value === correctLetter) { score++; } } const resultDiv = document.getElementById("resultBox"); resultDiv.style.display = "block"; const percentage = Math.round((score / totalQ) * 100); let feedbackMsg = ""; if (percentage >= 80) feedbackMsg = "🏆 उत्कृष्ट! Excellent!"; else if (percentage >= 60) feedbackMsg = "👍 अच्छा प्रयास! Good effort!"; else feedbackMsg = "📚 और अभ्यास करें। Keep practicing!"; resultDiv.innerHTML = `📊 Your Score: ${score} / ${totalQ} (${percentage}%) ${feedbackMsg}✨ सही उत्तर हरे में, गलत लाल में ✨⭐ सभी प्रश्नों की व्याख्या नीचे दी गई है | Explanations below each question.`; setTimeout(() => { resultDiv.scrollIntoView({ behavior: "smooth", block: "nearest" }); }, 80); } function handleSubmit() { submitQuizEvaluation(); } function init() { buildQuiz(); const submitBtn = document.getElementById("submitQuizBtn"); if (submitBtn) submitBtn.addEventListener("click", handleSubmit); } document.addEventListener("DOMContentLoaded", init);