#!/usr/bin/env python3
"""Unit 1 Part 2: Deneme 1 (Kolay) + Deneme 2 (Orta) — append to existing DOCX"""

from docx import Document
from docx.shared import Pt, Cm, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH

BLUE_DARK = RGBColor(0x1a, 0x47, 0x8a)
GRAY = RGBColor(0x66, 0x66, 0x66)

doc = Document('/root/Akademik/İngilizce/5. Sınıf/Unit1_My_Day_Kitap.docx')

# ── HELPERS ──
def add_page_break():
    doc.add_page_break()

def add_title(text, size=16, color=None):
    if color is None: color = BLUE_DARK
    p = doc.add_paragraph()
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    r = p.add_run(text)
    r.bold = True; r.font.size = Pt(size); r.font.color.rgb = color

def add_subtitle(text, size=12):
    p = doc.add_paragraph()
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    r = p.add_run(text)
    r.font.size = Pt(size); r.font.color.rgb = GRAY

def add_section_header(text):
    doc.add_paragraph()
    p = doc.add_paragraph()
    r = p.add_run(text)
    r.bold = True; r.font.size = Pt(13); r.font.color.rgb = BLUE_DARK

def add_question(num, question_text, options):
    p = doc.add_paragraph()
    r = p.add_run(f'{num}. {question_text}')
    r.bold = True; r.font.size = Pt(11)
    for opt in options:
        p2 = doc.add_paragraph()
        p2.paragraph_format.left_indent = Cm(1)
        p2.paragraph_format.space_before = Pt(1)
        p2.paragraph_format.space_after = Pt(2)
        r2 = p2.add_run(opt); r2.font.size = Pt(11)

# ═══════════════════════════════════════════════════════════════
# DENEME 1 — KOLAY
# ═══════════════════════════════════════════════════════════════
add_page_break()
add_title('DENEME 1 — KOLAY')
add_subtitle('15 Soru  |  Süre: 20 Dakika  |  Konu: am/is/are • Object Pronouns • Prepositions of Time')
doc.add_paragraph()

add_question(1, 'I _______ a student.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(2, 'She _______ my sister.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(3, 'They _______ at school now.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(4, 'We _______ very happy today.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(5, 'He _______ a doctor.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(6, 'I wake up _______ 7 o\'clock every morning.',
    ['A) at', 'B) in', 'C) before', 'D) after'])

add_question(7, 'My mother calls _______ every day.',
    ['A) I', 'B) me', 'C) my', 'D) mine'])

add_question(8, 'Look at _______! He is so funny.',
    ['A) he', 'B) him', 'C) his', 'D) her'])

add_question(9, 'I brush my teeth _______ breakfast.',
    ['A) at', 'B) in', 'C) before', 'D) on'])

add_question(10, 'We watch TV _______ dinner.',
    ['A) at', 'B) in', 'C) before', 'D) after'])

add_question(11, 'It is five _______. (05:00)',
    ['A) half past', "B) o'clock", 'C) quarter past', 'D) quarter to'])

add_question(12, 'My _______ are blue.',
    ['A) eyes', 'B) eye', 'C) hair', 'D) nose'])

add_question(13, 'I _______ my teeth every morning.',
    ['A) wash', 'B) brush', 'C) comb', 'D) take'])

add_question(14, 'We have breakfast in the _______.',
    ['A) evening', 'B) night', 'C) morning', 'D) afternoon'])

add_question(15, '_______ old is your brother?',
    ['A) What', 'B) How', 'C) Where', 'D) When'])

# ═══════════════════════════════════════════════════════════════
# DENEME 2 — ORTA
# ═══════════════════════════════════════════════════════════════
add_page_break()
add_title('DENEME 2 — ORTA')
add_subtitle('15 Soru  |  Süre: 20 Dakika  |  Kapsam: Unit 1 Grammar + Vocabulary')
doc.add_paragraph()

add_question(1, 'A: _______ you tired?\nB: No, I am not.',
    ['A) Am', 'B) Is', 'C) Are', 'D) Be'])

add_question(2, 'My brother _______ at home. He is at school.',
    ['A) is', "B) isn't", 'C) are', "D) aren't"])

add_question(3, 'A: Is she a teacher?\nB: No, _______ .',
    ['A) she is', "B) she isn't", 'C) he isn\'t', 'D) it isn\'t'])

add_question(4, 'We _______ sad. We are very happy!',
    ['A) is', "B) isn't", 'C) are', "D) aren't"])

add_question(5, 'My friends and I _______ in the same class.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(6, 'A: What time _______ it?\nB: It is half past nine.',
    ['A) am', 'B) is', 'C) are', 'D) be'])

add_question(7, 'I do my homework _______ school.',
    ['A) at', 'B) in', 'C) before', 'D) after'])

add_question(8, 'My father takes _______ to the park on Sundays.',
    ['A) we', 'B) us', 'C) our', 'D) they'])

add_question(9, 'My best friend is Ali. I like _______ very much.',
    ['A) he', 'B) his', 'C) him', 'D) her'])

add_question(10, 'A: Where is my book?\nB: _______ is on the table.',
    ['A) He', 'B) She', 'C) It', 'D) They'])

add_question(11, 'I brush my teeth _______ I go to bed.',
    ['A) at', 'B) in', 'C) before', 'D) after'])

add_question(12, 'Amy and Tom are my friends. I play with _______ every day.',
    ['A) they', 'B) them', 'C) him', 'D) her'])

add_question(13, 'It is quarter _______ eight. (07:45)',
    ['A) past', 'B) after', 'C) to', 'D) before'])

add_question(14, 'I wash my _______ before breakfast.',
    ['A) teeth', 'B) hair', 'C) face', 'D) homework'])

add_question(15, 'A: _______ do you have lunch?\nB: At 12:30.',
    ['A) Where', 'B) How', 'C) When', 'D) What time'])

doc.save('/root/Akademik/İngilizce/5. Sınıf/Unit1_My_Day_Kitap.docx')
print('Part 2 saved — Deneme 1 & 2 added.')
