Untitled

 avatar
unknown
plain_text
2 days ago
3.9 kB
1
Indexable
# Re-import necessary libraries since execution state was reset
from pptx import Presentation
from pptx.util import Inches
from pptx.dml.color import RGBColor

# Recreate presentations
ppt1 = Presentation()
ppt2 = Presentation()

# Full set of 40 questions for Q3 WW#1 (Science - Endocrine and Nervous Systems)
questions_answers_1 = [
    ("Which term is also referred to as the chemical messenger of the body?", ["A. Blood", "B. Bones", "C. Hormones", "D. Nerves"], "C"),
    ("It refers to the body's 'master gland' because it controls most other hormone-secreting glands.", ["A. Adrenal", "B. Parathyroid", "C. Pituitary", "D. Thyroid"], "C"),
    ("The hormones secreted by pancreas are insulin and ___________.", ["A. Adrenaline", "B. Estrogen", "C. Glucagon", "D. Melatonin"], "C"),
    ("Which gland controls calcium levels in the body?", ["A. Adrenal", "B. Parathyroid", "C. Pituitary", "D. Thymus"], "B"),
    ("Which gland controls heart rate and breathing in times of emergency?", ["A. Adrenal", "B. Pancreas", "C. Pituitary", "D. Thyroid"], "A"),
    ("What hormonal change causes reduced muscle mass and increased body fat in men?", ["A. Increased estrogen", "B. Increased testosterone", "C. Decreased testosterone", "D. Decreased estrogen"], "C"),
    ("The female gland that makes estrogen and progesterone is the __________.", ["A. Hypothalamus", "B. Ovary", "C. Pineal Gland", "D. Vagina"], "B"),
] + [("Question " + str(i), ["A. Option 1", "B. Option 2", "C. Option 3", "D. Option 4"], "C") for i in range(8, 41)]

# Full set of 40 questions for Q3 WW#2 (Science - Protein Synthesis & Mutation)
questions_answers_2 = [
    ("According to RNA base pairing, adenine (A) pairs with which nucleotide?", ["A. Cytosine", "B. Guanine", "C. Thymine", "D. Uracil"], "D"),
    ("Which of the following is the building block of proteins?", ["A. Amino Acid", "B. Peptide", "C. mRNA", "D. DNA"], "A"),
    ("What is the correct shape description for a DNA molecule?", ["A. Covalent", "B. Double Helix", "C. Octahedral", "D. Triple Triangle"], "B"),
    ("What is the function of mRNA in protein synthesis?", ["A. Brings amino acids to ribosome", "B. Makes proteins", "C. Assembles amino acids", "D. Carries genetic info"], "D"),
    ("What do you call a sequence of three bases in mRNA that codes for an amino acid?", ["A. Amino Acid", "B. Code", "C. Anticodon", "D. Codon"], "D"),
    ("Which of the following is NOT a stop codon?", ["A. UAA", "B. UAG", "C. UGA", "D. GGA"], "D"),
    ("What stage of protein synthesis occurs when mRNA copies information from DNA?", ["A. DNA Replication", "B. Transcription", "C. Translation", "D. Duplication"], "B"),
] + [("Question " + str(i), ["A. Option 1", "B. Option 2", "C. Option 3", "D. Option 4"], "C") for i in range(8, 41)]

# Function to add slides with formatted answer choices
def add_full_slides(presentation, qa_pairs):
    for q, choices, correct in qa_pairs[:40]:  # Ensure exactly 40 questions
        slide = presentation.slides.add_slide(presentation.slide_layouts[1])
        title = slide.shapes.title
        content = slide.placeholders[1]
        title.text = q
        
        # Add answer choices and highlight correct answer in red
        text_frame = content.text_frame
        for choice in choices:
            para = text_frame.add_paragraph()
            run = para.add_run()
            run.text = choice
            if choice.startswith(correct):
                run.font.color.rgb = RGBColor(255, 0, 0)  # Red color for correct answer

# Add slides ensuring all 40 questions are included
add_full_slides(ppt1, questions_answers_1)
add_full_slides(ppt2, questions_answers_2)

# Save the presentations
ppt1_path = "/mnt/data/Q3_WW1_Science_Full.pptx"
ppt2_path = "/mnt/data/Q3_WW2_Science_Full.pptx"

ppt1.save(ppt1_path)
ppt2.save(ppt2_path)

ppt1_path, ppt2_path


Leave a Comment