ÿþ<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NEET Biology Section Test</title> <link href="logo1.jpg" rel="icon"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <style> :root { --primary-color: #4361ee; --secondary-color: #3a0ca3; --accent-color: #4cc9f0; --light-color: #f8f9fa; --dark-color: #212529; --success-color: #38b000; --danger-color: #ff3333; --warning-color: #ff9e00; --info-color: #4895ef; --background-gradient: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%); --card-shadow: 0 10px 30px rgba(67, 97, 238, 0.15); --button-hover-shadow: 0 6px 12px rgba(67, 97, 238, 0.25); } * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; } body { background: var(--background-gradient); min-height: 100vh; padding: 20px; } .hidden { display: none; } .container { background-color: #fff; padding: 30px; border-radius: 15px; box-shadow: var(--card-shadow); width: 100%; max-width: 1000px; margin: 20px auto; transition: all 0.3s ease; } h1, h2, h3, h4 { color: var(--dark-color); margin-bottom: 20px; } h1 { text-align: center; color: var(--primary-color); font-size: 2.2rem; margin-bottom: 30px; position: relative; padding-bottom: 10px; } h1::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 3px; background: var(--accent-color); border-radius: 3px; } h2 { font-size: 1.5rem; color: var(--secondary-color); margin-top: 10px; } select, input[type="checkbox"], input[type="radio"] { margin-right: 10px; } select { width: 100%; padding: 12px 15px; border: 2px solid #ddd; border-radius: 8px; font-size: 1rem; transition: all 0.3s; margin-bottom: 20px; } select:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2); } label { display: inline-flex; align-items: center; margin-bottom: 12px; cursor: pointer; transition: all 0.2s; padding: 8px 12px; border-radius: 8px; } label:hover { background-color: rgba(67, 97, 238, 0.05); } input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary-color); } .btn { padding: 12px 25px; border: none; background-color: var(--primary-color); color: white; border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 500; transition: all 0.3s; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); display: inline-block; text-align: center; margin: 10px 5px; } .btn:hover { background-color: var(--secondary-color); transform: translateY(-2px); box-shadow: var(--button-hover-shadow); } .btn:active { transform: translateY(0); } .btn-secondary { background-color: var(--info-color); } .btn-secondary:hover { background-color: #3a7bd5; } .btn-danger { background-color: var(--danger-color); } .btn-danger:hover { background-color: #e60000; } .btn-success { background-color: var(--success-color); } .btn-success:hover { background-color: #32a000; } .navigation-buttons { display: flex; justify-content: space-between; margin-top: 30px; } .question { margin-bottom: 25px; padding: 20px; background-color: #f8f9fa; border-radius: 10px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); border-left: 4px solid var(--primary-color); } .question p { font-size: 1.1rem; margin-bottom: 15px; font-weight: 500; color: var(--dark-color); } .option { display: flex; align-items: center; margin-bottom: 10px; padding: 10px 15px; border-radius: 8px; background-color: white; border: 1px solid #eee; transition: all 0.2s; } .option:hover { border-color: var(--accent-color); background-color: rgba(76, 201, 240, 0.05); } .option input[type="radio"]:checked + label { font-weight: 600; color: var(--primary-color); } #timer { font-size: 1.3rem; font-weight: 600; padding: 10px 20px; background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%); color: white; border-radius: 50px; display: inline-block; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } #time.warning { color: var(--warning-color); animation: pulse 1s infinite; } #time.danger { color: var(--danger-color); animation: pulse 0.5s infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } .divider { height: 2px; background: linear-gradient(to right, transparent, var(--accent-color), transparent); margin: 20px 0; border: none; } .results-card { background-color: white; border-radius: 15px; padding: 30px; box-shadow: var(--card-shadow); margin-bottom: 30px; text-align: center; border-top: 5px solid var(--primary-color); } .score { font-size: 3rem; font-weight: 700; color: var(--primary-color); margin: 20px 0; } .progress-container { width: 100%; height: 20px; background-color: #e9ecef; border-radius: 10px; margin: 20px 0; overflow: hidden; } .progress-bar { height: 100%; background: linear-gradient(to right, var(--accent-color), var(--primary-color)); border-radius: 10px; transition: width 0.5s ease; } .summary-item { margin-bottom: 30px; padding: 20px; background-color: white; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); border-left: 3px solid var(--primary-color); } .correct-answer { color: var(--success-color); font-weight: 600; } .user-correct { color: var(--success-color); font-weight: 600; } .user-incorrect { color: var(--danger-color); font-weight: 600; text-decoration: line-through; } .chapter-selection-container { background-color: white; padding: 25px; border-radius: 15px; box-shadow: var(--card-shadow); margin-bottom: 30px; } .chapter-list { columns: 2; column-gap: 30px; } .marks-list { background-color: #f8f9fa; padding: 20px; border-radius: 10px; margin: 20px 0; } .marks-list label { display: block; margin-bottom: 15px; padding: 15px; background-color: white; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); transition: all 0.3s; } .marks-list label:hover { transform: translateX(5px); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); } /* Graphics Section */ .graphics-section { display: flex; flex-wrap: wrap; justify-content: space-around; margin: 30px 0; gap: 20px; } .graphic-card { background: white; border-radius: 10px; padding: 20px; width: 150px; text-align: center; box-shadow: var(--card-shadow); transition: transform 0.3s; border-top: 3px solid var(--primary-color); } .graphic-card:hover { transform: translateY(-5px); } .graphic-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; } .graphic-title { font-size: 0.9rem; font-weight: 500; color: var(--dark-color); } .slogan { text-align: center; font-size: 1.2rem; font-style: italic; color: var(--secondary-color); margin: 30px 0; padding: 15px; background: rgba(67, 97, 238, 0.1); border-radius: 8px; border-left: 4px solid var(--primary-color); } /* Exam Type Selection */ .exam-type-selection { background-color: white; padding: 25px; border-radius: 15px; box-shadow: var(--card-shadow); margin-top: 20px; } /* Selected Chapters Display */ .selected-chapters-display { background-color: #f8f9fa; padding: 15px; border-radius: 8px; margin: 15px 0; } .selected-chapter { display: inline-block; background-color: var(--primary-color); color: white; padding: 5px 10px; border-radius: 15px; margin: 5px; font-size: 0.9rem; } /* Next Button for Chapter Selection */ .chapter-next-btn { text-align: center; margin-top: 20px; } /* Subject Selection Cards */ .subject-selection-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 30px 0; } .subject-card { width: 150px; height: 150px; background: white; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; box-shadow: var(--card-shadow); border: 3px solid transparent; } .subject-card:hover { transform: translateY(-5px); box-shadow: var(--button-hover-shadow); } .subject-card.selected { border-color: var(--primary-color); background-color: rgba(67, 97, 238, 0.05); } .subject-icon { font-size: 3rem; margin-bottom: 10px; color: var(--primary-color); } .subject-name { font-weight: 500; text-align: center; } .selected-subjects-display { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; justify-content: center; } .selected-subject-chip { background-color: var(--primary-color); color: white; padding: 8px 15px; border-radius: 20px; display: flex; align-items: center; gap: 8px; } .selected-subject-chip i { cursor: pointer; } /* Responsive styles */ @media (max-width: 768px) { .container { padding: 20px; } h1 { font-size: 1.8rem; } .chapter-list { columns: 1; } .navigation-buttons { flex-direction: column; } .btn { width: 100%; margin: 5px 0; } .question { padding: 15px; } .graphics-section { gap: 10px; } .graphic-card { width: 120px; padding: 15px; } .subject-card { width: 120px; height: 120px; } } @media (max-width: 480px) { body { padding: 10px; } .container { padding: 15px; } h1 { font-size: 1.5rem; } .score { font-size: 2rem; } .graphic-card { width: 100px; padding: 10px; } .graphic-icon { font-size: 2rem; } .subject-card { width: 100px; height: 100px; } .subject-icon { font-size: 2rem; } } </style> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4930137336556867" crossorigin="anonymous"></script> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KMZ9RJ62EY"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KMZ9RJ62EY'); </script> </head> <body> <div class="container"> <h1>NEET Biology Section Test</h1> <!-- Subject Selection Screen --> <div id="subject-selection"> <h2>Select Biology Chapters</h2> <p>Select one or more chapters to include in your Biology exam</p> <div class="subject-selection-container"> <div class="subject-card selected" data-subject="Biology"> <div class="subject-icon"><i class="fas fa-dna"></i></div> <div class="subject-name">Biology</div> </div> </div> <div class="selected-subjects-display" id="selected-subjects-display"> <div class="selected-subject-chip"> Biology </div> </div> <!-- Graphics Section --> <div class="graphics-section"> <div class="graphic-card"> <div class="graphic-icon"><i class="fas fa-brain"></i></div> <div class="graphic-title">Concept Testing</div> </div> <div class="graphic-card"> <div class="graphic-icon"><i class="fas fa-stopwatch"></i></div> <div class="graphic-title">Timed Exams</div> </div> <div class="graphic-card"> <div class="graphic-icon"><i class="fas fa-chart-line"></i></div> <div class="graphic-title">Performance Analysis</div> </div> <div class="graphic-card"> <div class="graphic-icon"><i class="fas fa-book"></i></div> <div class="graphic-title">Chapter-wise</div> </div> <div class="graphic-card"> <div class="graphic-icon"><i class="fas fa-trophy"></i></div> <div class="graphic-title">Competitive Edge</div> </div> </div> <div class="slogan"> "Test Your Biology Knowledge, Master Key Concepts, Achieve Your NEET Goals" </div> <center> <button id="subject-next" class="btn">Next</button> </center> </div> <!-- Chapter Selection (Hidden Initially) --> <div id="chapter-selection" class="hidden"> <div class="chapter-selection-container"> <h2>Select Biology Chapters</h2> <p>Select one or more chapters to include in your Biology exam</p> <hr class="divider"> <div id="chapter-list" class="chapter-list"></div> </div> <div class="chapter-next-btn"> <button id="chapter-next" class="btn">Next</button> </div> </div> <!-- Exam Configuration (Hidden Initially) --> <div id="exam-configuration" class="hidden"> <div class="selected-chapters-display"> <h3>Selected Subject: <span id="display-subjects">Biology</span></h3> <h4>Selected Chapters:</h4> <div id="selected-chapters-list"></div> </div> <div class="exam-type-selection"> <h2>Select Exam Type</h2> <div class="marks-list"> <label><input type="radio" name="exam-type" value="10" checked> TEST TYPE I - 10 Questions, 10 Minutes, 10 Marks</label> <label><input type="radio" name="exam-type" value="20"> TEST TYPE II - 15 Questions, 15 Minutes, 15 Marks</label> <label><input type="radio" name="exam-type" value="30"> TEST TYPE III - 20 Questions, 20 Minutes, 20 Marks</label> </div> <center> <button id="load-quiz" class="btn btn-success">Start Biology Exam</button> </center> </div> </div> <!-- Exam Screen (Hidden Initially) --> <div id="exam-screen" class="hidden"> <center> <div id="timer"> <i class="fas fa-clock"></i> Time remaining: <span id="time"></span> </div> </center> <div id="quiz"></div> <div class="navigation-buttons"> <button id="previous" class="btn btn-secondary">Previous</button> <button id="next" class="btn btn-secondary">Next</button> </div> <center> <button id="submit" class="btn btn-danger">Submit Biology Exam</button> </center> </div> <!-- Results Screen (Hidden Initially) --> <div id="results" class="hidden"></div> <div id="summary" class="hidden"></div> </div> <script> const subjects = { Biology: [ "Chapter 1: The Living World", "Chapter 2: Biological Classification", "Chapter 3: Plant Kingdom", "Chapter 4: Animal Kingdom", "Chapter 5: Morphology of Flowering Plants", "Chapter 6: Anatomy of Flowering Plants", "Chapter 7: Structural Organisation in Animals", "Chapter 8: Cell: The Unit of Life", "Chapter 9: Biomolecules", "Chapter 10: Cell Cycle and Cell Division", "Chapter 11: Photosynthesis in Higher Plants", "Chapter 12: Respiration In Plants", "Chapter 13: Plant Growth and Development", "Chapter 14: Breathing and Exchange of Gases", "Chapter 15: Body Fluids and Circulation", "Chapter 16: Excretory Products and their Elimination", "Chapter 17: Locomotion and Movements", "Chapter 18: Neural Control and Coordination", "Chapter 19: Chemical Coordination and Integration", "Chapter 20: Sexual reproduction in flowering plants", "Chapter 21: Human Reproduction", "Chapter 22: Reproductive health", "Chapter 23: Principles of Inheritance and Variation", "Chapter 24: Molecular basis of Inheritance", "Chapter 25: Evolution", "Chapter 26: Human Health and Disease", "Chapter 27: Microbes in human welfare", "Chapter 28: Biotechnology: Principles and processes", "Chapter 29: Biotechnology and its Applications", "Chapter 30: Organisms and Populations", "Chapter 31: Ecosystem", "Chapter 32: Biodiversity and its conservation" ] }; const questions = { "Chapter 1: The Living World": [ { question: "The basic unit of classification is:", options: ["Species", "Genus", "Family", "Order"], answer: "Species" }, { question: "Which of the following is not a characteristic of living organisms?", options: ["Growth", "Reproduction", "Metabolism", "Isolation"], answer: "Isolation" }, { question: "Binomial nomenclature was introduced by:", options: ["Linnaeus", "Darwin", "Haeckel", "Whittaker"], answer: "Linnaeus" } ], "Chapter 2: Biological Classification": [ { question: "Which kingdom includes organisms that are unicellular and prokaryotic?", options: ["Monera", "Protista", "Fungi", "Plantae"], answer: "Monera" }, { question: "The five-kingdom classification was proposed by:", options: ["Linnaeus", "Whittaker", "Haeckel", "Copeland"], answer: "Whittaker" } ], "Chapter 3: Plant Kingdom": [ { question: "Which of the following is a non-vascular plant?", options: ["Bryophytes", "Pteridophytes", "Gymnosperms", "Angiosperms"], answer: "Bryophytes" }, { question: "The dominant phase in the life cycle of a fern is:", options: ["Gametophyte", "Sporophyte", "Both equally", "None of these"], answer: "Sporophyte" } ], "Chapter 4: Animal Kingdom": [ { question: "Which phylum includes animals with notochord?", options: ["Chordata", "Arthropoda", "Mollusca", "Annelida"], answer: "Chordata" }, { question: "Animals with bilateral symmetry belong to:", options: ["Radiata", "Bilateria", "Coelenterata", "Porifera"], answer: "Bilateria" } ], "Chapter 5: Morphology of Flowering Plants": [ { question: "The root that develops from the radicle is called:", options: ["Tap root", "Fibrous root", "Adventitious root", "Prop root"], answer: "Tap root" }, { question: "The arrangement of flowers on the floral axis is called:", options: ["Inflorescence", "Placentation", "Aestivation", "Venation"], answer: "Inflorescence" } ], "Chapter 6: Anatomy of Flowering Plants": [ { question: "The tissue responsible for the secondary growth in plants is:", options: ["Cambium", "Epidermis", "Cortex", "Pith"], answer: "Cambium" } ], "Chapter 7: Structural Organisation in Animals": [ { question: "Which tissue is responsible for movement in our body?", options: ["Muscular tissue", "Nervous tissue", "Epithelial tissue", "Connective tissue"], answer: "Muscular tissue" } ], "Chapter 8: Cell: The Unit of Life": [ { question: "The power house of the cell is:", options: ["Mitochondria", "Chloroplast", "Nucleus", "Golgi apparatus"], answer: "Mitochondria" }, { question: "Who discovered the cell?", options: ["Robert Hooke", "Leeuwenhoek", "Schleiden", "Schwann"], answer: "Robert Hooke" } ], "Chapter 9: Biomolecules": [ { question: "Which of the following is a polysaccharide?", options: ["Glucose", "Fructose", "Starch", "Sucrose"], answer: "Starch" }, { question: "Enzymes are:", options: ["Carbohydrates", "Lipids", "Proteins", "Nucleic acids"], answer: "Proteins" } ], "Chapter 10: Cell Cycle and Cell Division": [ { question: "The phase of cell division when chromosomes align at the equator is:", options: ["Prophase", "Metaphase", "Anaphase", "Telophase"], answer: "Metaphase" }, { question: "Crossing over occurs during:", options: ["Mitosis", "Meiosis I", "Meiosis II", "Both A and B"], answer: "Meiosis I" } ], "Chapter 11: Photosynthesis in Higher Plants": [ { question: "The primary pigment involved in photosynthesis is:", options: ["Chlorophyll a", "Chlorophyll b", "Carotene", "Xanthophyll"], answer: "Chlorophyll a" }, { question: "The site of light reaction in chloroplast is:", options: ["Stroma", "Grana", "Both", "None"], answer: "Grana" } ], "Chapter 12: Respiration In Plants": [ { question: "The end product of glycolysis is:", options: ["Pyruvate", "Acetyl CoA", "Glucose", "ATP"], answer: "Pyruvate" }, { question: "The Krebs cycle occurs in:", options: ["Cytoplasm", "Mitochondrial matrix", "Inner mitochondrial membrane", "Nucleus"], answer: "Mitochondrial matrix" } ], "Chapter 13: Plant Growth and Development": [ { question: "Which plant hormone promotes cell division?", options: ["Auxin", "Gibberellin", "Cytokinin", "Abscisic acid"], answer: "Cytokinin" } ], "Chapter 14: Breathing and Exchange of Gases": [ { question: "The respiratory pigment in human blood is:", options: ["Haemoglobin", "Chlorophyll", "Myoglobin", "Cytochrome"], answer: "Haemoglobin" }, { question: "The volume of air inspired or expired during normal breathing is called:", options: ["Tidal volume", "Inspiratory reserve volume", "Expiratory reserve volume", "Vital capacity"], answer: "Tidal volume" } ], "Chapter 15: Body Fluids and Circulation": [ { question: "The normal blood pressure in human is:", options: ["120/80 mmHg", "140/90 mmHg", "100/60 mmHg", "130/85 mmHg"], answer: "120/80 mmHg" }, { question: "Which blood group is called universal donor?", options: ["A", "B", "AB", "O"], answer: "O" } ], "Chapter 16: Excretory Products and their Elimination": [ { question: "The functional unit of kidney is:", options: ["Neuron", "Nephron", "Ureter", "Urethra"], answer: "Nephron" }, { question: "The process of urine formation does not involve:", options: ["Glomerular filtration", "Tubular reabsorption", "Tubular secretion", "Reverse osmosis"], answer: "Reverse osmosis" } ], "Chapter 17: Locomotion and Movements": [ { question: "The contractile unit of muscle is:", options: ["Sarcomere", "Myofibril", "Fascicle", "Tendon"], answer: "Sarcomere" } ], "Chapter 18: Neural Control and Coordination": [ { question: "The junction between two neurons is called:", options: ["Synapse", "Dendrite", "Axon", "Cell body"], answer: "Synapse" }, { question: "Which part of the brain controls voluntary actions?", options: ["Cerebrum", "Cerebellum", "Medulla", "Hypothalamus"], answer: "Cerebrum" } ], "Chapter 19: Chemical Coordination and Integration": [ { question: "Which gland is called the master gland?", options: ["Pituitary", "Thyroid", "Adrenal", "Pancreas"], answer: "Pituitary" }, { question: "Insulin is secreted by:", options: ["Alpha cells of pancreas", "Beta cells of pancreas", "Liver", "Adrenal cortex"], answer: "Beta cells of pancreas" } ], "Chapter 20: Sexual reproduction in flowering plants": [ { question: "The transfer of pollen from anther to stigma is called:", options: ["Pollination", "Fertilization", "Germination", "Imbibition"], answer: "Pollination" }, { question: "The male gametophyte in angiosperms is:", options: ["Embryo sac", "Pollen grain", "Ovule", "Anther"], answer: "Pollen grain" } ], "Chapter 21: Human Reproduction": [ { question: "The process of release of ovum from ovary is called:", options: ["Ovulation", "Menstruation", "Fertilization", "Implantation"], answer: "Ovulation" }, { question: "The normal duration of human pregnancy is about:", options: ["280 days", "240 days", "320 days", "180 days"], answer: "280 days" } ], "Chapter 22: Reproductive health": [ { question: "Which of the following is a barrier method of contraception?", options: ["Condom", "Oral pills", "IUCD", "Vasectomy"], answer: "Condom" } ], "Chapter 23: Principles of Inheritance and Variation": [ { question: "The father of genetics is:", options: ["Gregor Mendel", "Charles Darwin", "Hugo de Vries", "T.H. Morgan"], answer: "Gregor Mendel" }, { question: "In humans, the sex of the child is determined by:", options: ["Father", "Mother", "Both equally", "Environment"], answer: "Father" } ], "Chapter 24: Molecular basis of Inheritance": [ { question: "The double helix model of DNA was proposed by:", options: ["Watson and Crick", "Darwin and Wallace", "Mendel and Morgan", "Hershey and Chase"], answer: "Watson and Crick" }, { question: "The process of formation of mRNA from DNA is called:", options: ["Transcription", "Translation", "Replication", "Transformation"], answer: "Transcription" } ], "Chapter 25: Evolution": [ { question: "The theory of natural selection was proposed by:", options: ["Charles Darwin", "Lamarck", "Hugo de Vries", "Oparin"], answer: "Charles Darwin" }, { question: "The book 'Origin of Species' was written by:", options: ["Charles Darwin", "Lamarck", "Mendel", "Haldane"], answer: "Charles Darwin" } ], "Chapter 26: Human Health and Disease": [ { question: "Which of the following is a viral disease?", options: ["Tuberculosis", "Malaria", "AIDS", "Typhoid"], answer: "AIDS" }, { question: "The vector for malaria is:", options: ["Female Anopheles mosquito", "Male Anopheles mosquito", "Culex mosquito", "Housefly"], answer: "Female Anopheles mosquito" } ], "Chapter 27: Microbes in human welfare": [ { question: "Which microbe is used in the production of curd?", options: ["Lactobacillus", "Saccharomyces", "Penicillium", "Rhizobium"], answer: "Lactobacillus" }, { question: "The antibiotic penicillin is obtained from:", options: ["Bacteria", "Virus", "Fungus", "Protozoa"], answer: "Fungus" } ], "Chapter 28: Biotechnology: Principles and processes": [ { question: "Restriction enzymes are used in:", options: ["DNA cutting", "DNA synthesis", "Protein synthesis", "Cell division"], answer: "DNA cutting" }, { question: "The process of making multiple copies of DNA is called:", options: ["PCR", "Gel electrophoresis", "Southern blotting", "Cloning"], answer: "PCR" } ], "Chapter 29: Biotechnology and its Applications": [ { question: "Bt cotton is resistant to:", options: ["Insects", "Fungi", "Bacteria", "Viruses"], answer: "Insects" }, { question: "The first transgenic cow produced:", options: ["Human protein in milk", "More milk", "More meat", "All of these"], answer: "Human protein in milk" } ], "Chapter 30: Organisms and Populations": [ { question: "The interaction where both species are benefited is called:", options: ["Mutualism", "Commensalism", "Parasitism", "Predation"], answer: "Mutualism" }, { question: "A group of individuals of same species in an area is called:", options: ["Population", "Community", "Ecosystem", "Biome"], answer: "Population" } ], "Chapter 31: Ecosystem": [ { question: "The ultimate source of energy in an ecosystem is:", options: ["Sun", "Plants", "Animals", "Bacteria"], answer: "Sun" }, { question: "The process of energy transfer in an ecosystem is:", options: ["Unidirectional", "Bidirectional", "Multidirectional", "Cyclic"], answer: "Unidirectional" } ], "Chapter 32: Biodiversity and its conservation": [ { question: "The term biodiversity was popularized by:", options: ["Edward Wilson", "Ernst Haeckel", "Robert Whittaker", "R.H. Whittaker"], answer: "Edward Wilson" }, { question: "Which of the following is an in-situ conservation method?", options: ["National parks", "Botanical gardens", "Seed banks", "Tissue culture"], answer: "National parks" } ] }; let selectedChapters = []; let selectedMarks = 0; let quizQuestions = []; let currentQuestionIndex = 0; let timer; let timeLeft; let selectedSubjects = ["Biology"]; let allSelectedChapters = {}; // Automatically select Biology document.addEventListener('DOMContentLoaded', function() { document.querySelector('.subject-card').classList.add('selected'); updateSelectedSubjectsDisplay(); }); function updateSelectedSubjectsDisplay() { const display = document.getElementById('selected-subjects-display'); display.innerHTML = ''; selectedSubjects.forEach(subject => { const chip = document.createElement('div'); chip.className = 'selected-subject-chip'; chip.innerHTML = ` ${subject} `; display.appendChild(chip); }); } document.getElementById('subject-next').addEventListener('click', function() { // Populate chapters for Biology const chapterList = document.getElementById('chapter-list'); chapterList.innerHTML = ''; selectedSubjects.forEach(subject => { const subjectHeader = document.createElement('h3'); subjectHeader.textContent = subject; chapterList.appendChild(subjectHeader); subjects[subject].forEach(chapter => { const div = document.createElement('div'); div.className = 'option'; const checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.value = chapter; checkbox.id = chapter; checkbox.dataset.subject = subject; const label = document.createElement('label'); label.htmlFor = chapter; label.textContent = chapter; div.appendChild(checkbox); div.appendChild(label); chapterList.appendChild(div); }); }); // Show chapter selection and hide subject selection document.getElementById('subject-selection').classList.add('hidden'); document.getElementById('chapter-selection').classList.remove('hidden'); }); document.getElementById('chapter-next').addEventListener('click', function() { // Get selected chapters const chapterCheckboxes = document.querySelectorAll('#chapter-list input[type="checkbox"]'); selectedChapters = Array.from(chapterCheckboxes) .filter(cb => cb.checked) .map(cb => cb.value); if (selectedChapters.length === 0) { alert('Please select at least one chapter to continue.'); return; } // Group chapters by subject for display allSelectedChapters = {}; selectedChapters.forEach(chapter => { const subject = document.querySelector(`input[value="${chapter}"]`).dataset.subject; if (!allSelectedChapters[subject]) { allSelectedChapters[subject] = []; } allSelectedChapters[subject].push(chapter); }); // Update display document.getElementById('display-subjects').textContent = selectedSubjects.join(', '); const selectedChaptersList = document.getElementById('selected-chapters-list'); selectedChaptersList.innerHTML = ''; for (const subject in allSelectedChapters) { const subjectDiv = document.createElement('div'); subjectDiv.innerHTML = `<strong>${subject}:</strong>`; selectedChaptersList.appendChild(subjectDiv); allSelectedChapters[subject].forEach(chapter => { const chip = document.createElement('span'); chip.className = 'selected-chapter'; chip.textContent = chapter; selectedChaptersList.appendChild(chip); }); } // Show exam configuration and hide chapter selection document.getElementById('chapter-selection').classList.add('hidden'); document.getElementById('exam-configuration').classList.remove('hidden'); }); document.getElementById('load-quiz').addEventListener('click', function() { const selectedExamType = document.querySelector('input[name="exam-type"]:checked'); if (selectedChapters.length > 0 && selectedExamType) { selectedMarks = parseInt(selectedExamType.value); quizQuestions = []; // Gather questions from selected chapters selectedChapters.forEach(chapter => { if (questions[chapter]) { quizQuestions = quizQuestions.concat(questions[chapter]); } }); // Shuffle questions and select based on test type quizQuestions = quizQuestions.sort(() => Math.random() - 0.5) .slice(0, selectedMarks); if (quizQuestions.length === 0) { alert('No questions available for selected chapters. Please try different chapters.'); return; } // Start the exam currentQuestionIndex = 0; document.getElementById('exam-configuration').classList.add('hidden'); document.getElementById('exam-screen').classList.remove('hidden'); displayQuestion(); startTimer(); } }); function displayQuestion() { const quizDiv = document.getElementById('quiz'); quizDiv.innerHTML = ''; const currentQuestion = quizQuestions[currentQuestionIndex]; const questionElement = document.createElement('div'); questionElement.className = 'question'; questionElement.innerHTML = ` <p>Question ${currentQuestionIndex + 1} of ${quizQuestions.length}</p> <p>${currentQuestion.question}</p> `; currentQuestion.options.forEach((option, index) => { const optionDiv = document.createElement('div'); optionDiv.className = 'option'; const radio = document.createElement('input'); radio.type = 'radio'; radio.name = 'option'; radio.id = `option-${currentQuestionIndex}-${index}`; radio.value = option; radio.checked = currentQuestion.selectedOption === option; const label = document.createElement('label'); label.htmlFor = `option-${currentQuestionIndex}-${index}`; label.textContent = option; optionDiv.appendChild(radio); optionDiv.appendChild(label); questionElement.appendChild(optionDiv); }); quizDiv.appendChild(questionElement); updateNavigationButtons(); } function updateNavigationButtons() { document.getElementById('previous').classList.toggle('hidden', currentQuestionIndex === 0); document.getElementById('next').classList.toggle('hidden', currentQuestionIndex === quizQuestions.length - 1); } document.getElementById('previous').addEventListener('click', function() { saveAnswer(); if (currentQuestionIndex > 0) { currentQuestionIndex--; displayQuestion(); } }); document.getElementById('next').addEventListener('click', function() { saveAnswer(); if (currentQuestionIndex < quizQuestions.length - 1) { currentQuestionIndex++; displayQuestion(); } }); document.getElementById('submit').addEventListener('click', function() { if (confirm('Are you sure you want to submit your Biology exam?')) { saveAnswer(); clearInterval(timer); showResults(); } }); function saveAnswer() { const selectedOption = document.querySelector('#quiz input[name="option"]:checked'); if (selectedOption) { quizQuestions[currentQuestionIndex].selectedOption = selectedOption.value; } } function startTimer() { timeLeft = selectedMarks === 10 ? 600 : selectedMarks === 20 ? 900 : 1200; updateTimerDisplay(); timer = setInterval(function() { timeLeft--; updateTimerDisplay(); if (timeLeft <= 0) { clearInterval(timer); alert('Time is up! Your Biology exam will be submitted automatically.'); showResults(); } }, 1000); } function updateTimerDisplay() { const timeElement = document.getElementById('time'); timeElement.textContent = formatTime(timeLeft); // Change color based on remaining time if (timeLeft <= 60) { timeElement.className = 'danger'; } else if (timeLeft <= 180) { timeElement.className = 'warning'; } else { timeElement.className = ''; } } function formatTime(seconds) { const minutes = Math.floor(seconds / 60); const secs = seconds % 60; return `${minutes}:${secs < 10 ? '0' : ''}${secs}`; } function showResults() { // Calculate results const correctCount = quizQuestions.reduce((acc, q) => acc + (q.selectedOption === q.answer ? 1 : 0), 0); const percentage = Math.round((correctCount / quizQuestions.length) * 100); // Hide exam screen document.getElementById('exam-screen').classList.add('hidden'); // Display results card const resultsDiv = document.getElementById('results'); resultsDiv.innerHTML = ` <div class="results-card"> <h2>Biology Exam Results</h2> <p>Subject: Biology</p> <div class="score">${correctCount}/${quizQuestions.length}</div> <div class="progress-container"> <div class="progress-bar" style="width: ${percentage}%"></div> </div> <p>You scored ${percentage}%</p> <button id="view-details" class="btn">View Detailed Results</button> </div> `; // Show results resultsDiv.classList.remove('hidden'); // Prepare summary const summaryDiv = document.getElementById('summary'); summaryDiv.innerHTML = ` <h3>Biology Exam Summary</h3> <p>Total questions: ${quizQuestions.length}</p> <p>Attempted: ${quizQuestions.filter(q => q.selectedOption).length}</p> <p>Correct answers: ${correctCount}</p> <p>Incorrect answers: ${quizQuestions.filter(q => q.selectedOption && q.selectedOption !== q.answer).length}</p> <p>Unattempted: ${quizQuestions.filter(q => !q.selectedOption).length}</p> `; // Add detailed question review quizQuestions.forEach((q, index) => { const questionDiv = document.createElement('div'); questionDiv.className = 'summary-item'; let statusClass = ''; if (q.selectedOption === q.answer) { statusClass = 'user-correct'; } else if (q.selectedOption && q.selectedOption !== q.answer) { statusClass = 'user-incorrect'; } questionDiv.innerHTML = ` <p><strong>Question ${index + 1}:</strong> ${q.question}</p> <p class="${statusClass}">Your answer: ${q.selectedOption || 'Not attempted'}</p> <p class="correct-answer">Correct answer: ${q.answer}</p> `; summaryDiv.appendChild(questionDiv); }); // Show details button functionality document.getElementById('view-details').addEventListener('click', function() { summaryDiv.classList.toggle('hidden'); this.textContent = summaryDiv.classList.contains('hidden') ? 'View Detailed Results' : 'Hide Detailed Results'; }); } </script> </body> </html>