Please prepare a colorful handbook pdf for 15 logical and not funny conversation questions along with their answers on topic compound words using present simple and present continuous tense only while using pronouns in it . Please make interesting useful questions along with answers where compound words are used.
~/
compound words present simple present continuous ESL activities pronouns
mkdir -p "/tmp/workspace/compound-words-handbook/src" "/tmp/workspace/compound-words-handbook/output" && python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.lib.units import mm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, KeepTogether from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.colors import HexColor from reportlab.pdfgen import canvas from reportlab.lib.utils import ImageReader import os out='/tmp/workspace/compound-words-handbook/output/Compound_Words_Conversation_Handbook.pdf' items=[ ('1', 'What do you usually do with your <b>toothbrush</b>?', 'I use it every morning and every night.', 'present simple'), ('2', 'Is she carrying her <b>backpack</b> now?', 'Yes, she is carrying it to the classroom now.', 'present continuous'), ('3', 'Where does he keep his <b>notebook</b>?', 'He keeps it on his desk.', 'present simple'), ('4', 'Are they watching the <b>sunset</b> now?', 'Yes, they are watching it from the beach.', 'present continuous'), ('5', 'Does your brother clean his <b>bedroom</b> every week?', 'Yes, he cleans it every Saturday.', 'present simple'), ('6', 'Why are you wearing your <b>raincoat</b> today?', 'I am wearing it because it is raining.', 'present continuous'), ('7', 'What does she put in the <b>mailbox</b> every morning?', 'She puts the letters in it.', 'present simple'), ('8', 'Is he waiting at the <b>bus stop</b> now?', 'Yes, he is waiting there with his friend.', 'present continuous'), ('9', 'When do they eat <b>breakfast</b>?', 'They eat it before school.', 'present simple'), ('10', 'Are we using the <b>classroom</b> now?', 'Yes, we are using it for our English lesson.', 'present continuous'), ('11', 'What does it show on the <b>website</b>?', 'It shows the school timetable.', 'present simple'), ('12', 'Is she holding an <b>umbrella</b> now?', 'Yes, she is holding it near the door.', 'present continuous'), ('13', 'Who checks the <b>homework</b> every day?', 'Our teacher checks it after class.', 'present simple'), ('14', 'Are you reading the <b>newspaper</b> now?', 'No, I am reading it after dinner.', 'present continuous'), ('15', 'Does he use the <b>playground</b> after lunch?', 'Yes, he uses it with his classmates.', 'present simple'), ] class NumberedCanvas(canvas.Canvas): def __init__(self,*args,**kwargs): canvas.Canvas.__init__(self,*args,**kwargs); self.pages=[] def showPage(self): self.pages.append(dict(self.__dict__)); self._startPage() def save(self): count=len(self.pages) for state in self.pages: self.__dict__.update(state) self.setFillColor(HexColor('#334155')); self.setFont('Helvetica',8.5) self.drawString(18*mm, 12*mm, 'Compound Words Conversation Handbook') self.drawRightString(192*mm, 12*mm, f'Page {self._pageNumber} of {count}') self.showPage() canvas.Canvas.save(self) styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='CoverTitle', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=31, leading=36, alignment=TA_CENTER, textColor=HexColor('#102A43'), spaceAfter=10)) styles.add(ParagraphStyle(name='CoverSub', parent=styles['Normal'], fontName='Helvetica', fontSize=14, leading=20, alignment=TA_CENTER, textColor=HexColor('#334155'))) styles.add(ParagraphStyle(name='Section', parent=styles['Heading2'], fontName='Helvetica-Bold', fontSize=19, leading=23, textColor=HexColor('#102A43'), spaceAfter=8)) styles.add(ParagraphStyle(name='BodyX', parent=styles['BodyText'], fontName='Helvetica', fontSize=10.3, leading=14.2, textColor=HexColor('#1F2937'))) styles.add(ParagraphStyle(name='Question', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=11, leading=15, textColor=HexColor('#172554'))) styles.add(ParagraphStyle(name='Answer', parent=styles['BodyText'], fontName='Helvetica', fontSize=10.5, leading=14.5, textColor=HexColor('#1F2937'))) styles.add(ParagraphStyle(name='Small', parent=styles['BodyText'], fontName='Helvetica', fontSize=9, leading=12, textColor=HexColor('#475569'))) story=[] # cover story += [Spacer(1,25*mm), Paragraph('Compound Words<br/>Conversation Handbook', styles['CoverTitle']), Spacer(1,7*mm), Paragraph('15 useful question-and-answer models<br/>Present simple • Present continuous • Pronouns', styles['CoverSub']), Spacer(1,16*mm)] # decorative panels cover_data=[[Paragraph('<b>Use this handbook to practise:</b><br/>• compound words in meaningful situations<br/>• present simple for routines and facts<br/>• present continuous for actions now<br/>• pronouns such as I, you, he, she, it, we, and they', styles['BodyX'])]] t=Table(cover_data,colWidths=[150*mm], rowHeights=[52*mm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#E0F2FE')),('BOX',(0,0),(-1,-1),1.2,HexColor('#38BDF8')),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('LEFTPADDING',(0,0),(-1,-1),12*mm),('RIGHTPADDING',(0,0),(-1,-1),12*mm)])) story += [t, Spacer(1,13*mm), Paragraph('<b>How to use it</b> Read each question aloud, answer it, then change one detail to make your own conversation.', styles['CoverSub']), PageBreak()] # guide story += [Paragraph('Quick Grammar Guide', styles['Section'])] guide=[ [Paragraph('<b>Present simple</b>',styles['BodyX']),Paragraph('Use it for habits, routines, and facts. Example: <i>She cleans it every Saturday.</i>',styles['BodyX'])], [Paragraph('<b>Present continuous</b>',styles['BodyX']),Paragraph('Use it for actions happening now. Form: <i>am / is / are + verb-ing</i>. Example: <i>They are watching it now.</i>',styles['BodyX'])], [Paragraph('<b>Pronouns</b>',styles['BodyX']),Paragraph('Pronouns replace nouns: <i>the backpack → it</i>; <i>the students → they</i>; <i>my friend and I → we</i>.',styles['BodyX'])], [Paragraph('<b>Compound words</b>',styles['BodyX']),Paragraph('A compound word joins two words to make one idea, such as <i>tooth + brush = toothbrush</i>. The target compound words are in bold.',styles['BodyX'])], ] t=Table(guide,colWidths=[45*mm,112*mm],hAlign='LEFT') t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FFF7ED')),('GRID',(0,0),(-1,-1),0.6,HexColor('#FDBA74')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6*mm),('RIGHTPADDING',(0,0),(-1,-1),6*mm),('TOPPADDING',(0,0),(-1,-1),5*mm),('BOTTOMPADDING',(0,0),(-1,-1),5*mm),('BACKGROUND',(0,0),(0,-1),HexColor('#FFEDD5'))])) story += [t, Spacer(1,10*mm), Paragraph('Conversation Questions and Answers', styles['Section'])] palette=[('#DBEAFE','#2563EB'),('#DCFCE7','#16A34A'),('#FCE7F3','#DB2777'),('#FEF3C7','#D97706'),('#EDE9FE','#7C3AED')] for idx,(n,q,a,tense) in enumerate(items): bg,accent=map(HexColor,palette[idx%5]) label=Paragraph(f'<b>{n}. {tense.title()}</b>', styles['Small']) qbox=Paragraph('Q. '+q,styles['Question']) abox=Paragraph('A. '+a,styles['Answer']) tbl=Table([[label],[qbox],[abox]], colWidths=[157*mm]) tbl.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),bg),('BACKGROUND',(0,0),(-1,0),accent),('TEXTCOLOR',(0,0),(-1,0),colors.white),('BOX',(0,0),(-1,-1),0.8,accent),('LINEBELOW',(0,1),(-1,1),0.35,accent),('LEFTPADDING',(0,0),(-1,-1),5*mm),('RIGHTPADDING',(0,0),(-1,-1),5*mm),('TOPPADDING',(0,0),(-1,-1),3.5*mm),('BOTTOMPADDING',(0,0),(-1,-1),3.5*mm)])) story += [KeepTogether([tbl, Spacer(1,4.2*mm)])] story += [Spacer(1,3*mm), Paragraph('Practice challenge',styles['Section']), Paragraph('Choose any five conversations. Replace the compound word with another compound word, keep the tense, and answer with a pronoun. Example: “Is she carrying her <b>backpack</b> now?” → “Is she holding her <b>umbrella</b> now?”',styles['BodyX'])] doc=SimpleDocTemplate(out,pagesize=A4,rightMargin=18*mm,leftMargin=18*mm,topMargin=17*mm,bottomMargin=20*mm,title='Compound Words Conversation Handbook',author='Orris') doc.build(story,canvasmaker=NumberedCanvas) print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/compound-words-handbook/output/Compound_Words_Conversation_Handbook.pdf' r=PdfReader(p) print('pages',len(r.pages),'bytes',__import__('os').path.getsize(p)) text='\n'.join(page.extract_text() or '' for page in r.pages) print('questions',text.count('Q.')) print(text[:700]) PY
~/compound-words-handbook/
~/compound-words-handbook/output
~/compound-words-handbook/src
python - <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import A4 from reportlab.lib.colors import HexColor, white from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.units import mm from reportlab.pdfbase.pdfmetrics import stringWidth from pypdf import PdfReader import os out='/tmp/workspace/compound-words-handbook/output/Compound_Words_Conversation_Handbook.pdf' items=[ ('What do you usually do with your toothbrush?','I use it every morning and every night.','Present simple'), ('Is she carrying her backpack now?','Yes, she is carrying it to the classroom now.','Present continuous'), ('Where does he keep his notebook?','He keeps it on his desk.','Present simple'), ('Are they watching the sunset now?','Yes, they are watching it from the beach.','Present continuous'), ('Does your brother clean his bedroom every week?','Yes, he cleans it every Saturday.','Present simple'), ('Why are you wearing your raincoat today?','I am wearing it because it is raining.','Present continuous'), ('What does she put in the mailbox every morning?','She puts the letters in it.','Present simple'), ('Is he waiting at the bus stop now?','Yes, he is waiting there with his friend.','Present continuous'), ('When do they eat breakfast?','They eat it before school.','Present simple'), ('Are we using the classroom now?','Yes, we are using it for our English lesson.','Present continuous'), ('What does it show on the website?','It shows the school timetable.','Present simple'), ('Is she holding an umbrella now?','Yes, she is holding it near the door.','Present continuous'), ('Who checks the homework every day?','Our teacher checks it after class.','Present simple'), ('Are you reading the newspaper now?','No, I am reading it after dinner.','Present continuous'), ('Does he use the playground after lunch?','Yes, he uses it with his classmates.','Present simple')] colors=[(HexColor('#DBEAFE'),HexColor('#2563EB')),(HexColor('#DCFCE7'),HexColor('#16A34A')),(HexColor('#FCE7F3'),HexColor('#DB2777')),(HexColor('#FEF3C7'),HexColor('#D97706')),(HexColor('#EDE9FE'),HexColor('#7C3AED'))] W,H=A4 c=canvas.Canvas(out,pagesize=A4) c.setTitle('Compound Words Conversation Handbook') def foot(page,total): c.setFillColor(HexColor('#475569')); c.setFont('Helvetica',8) c.drawString(18*mm,10*mm,'Compound Words Conversation Handbook') c.drawRightString(W-18*mm,10*mm,f'Page {page} of {total}') def wrap(text,font,size,width): words=text.split(); lines=[]; line='' for word in words: test=(line+' '+word).strip() if stringWidth(test,font,size)<=width: line=test else: lines.append(line);line=word if line: lines.append(line) return lines # cover c.setFillColor(HexColor('#F0F9FF'));c.rect(0,0,W,H,fill=1,stroke=0) for x,y,r,col in [(35,750,48,'#BAE6FD'),(520,710,58,'#C4B5FD'),(500,180,50,'#FDE68A'),(65,160,40,'#BBF7D0')]: c.setFillColor(HexColor(col));c.circle(x,y,r,fill=1,stroke=0) c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',28) c.drawCentredString(W/2,205*mm,'Compound Words') c.drawCentredString(W/2,192*mm,'Conversation Handbook') c.setFillColor(HexColor('#334155'));c.setFont('Helvetica',14) c.drawCentredString(W/2,176*mm,'15 useful question-and-answer models') c.drawCentredString(W/2,168*mm,'Present simple • Present continuous • Pronouns') c.setFillColor(white);c.roundRect(30*mm,83*mm,150*mm,62*mm,10*mm,fill=1,stroke=0) c.setFillColor(HexColor('#1E3A5F'));c.setFont('Helvetica-Bold',14);c.drawString(42*mm,133*mm,'What you practise') c.setFont('Helvetica',11);y=123*mm for line in ['• Compound words in meaningful situations','• Present simple for routines and facts','• Present continuous for actions happening now','• Pronouns: I, you, he, she, it, we, and they']: c.drawString(43*mm,y,line);y-=8*mm c.setFillColor(HexColor('#0F766E'));c.setFont('Helvetica-Bold',11);c.drawCentredString(W/2,65*mm,'Read, answer, and make your own conversations.') foot(1,4);c.showPage() # guide c.setFillColor(HexColor('#FFFDF5'));c.rect(0,0,W,H,fill=1,stroke=0) c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',23);c.drawString(18*mm,270*mm,'Quick Grammar Guide') boxes=[('Present simple','Use it for habits, routines, and facts. Example: She cleans it every Saturday.'),('Present continuous','Use it for actions happening now. Form: am / is / are + verb-ing. Example: They are watching it now.'),('Pronouns','Pronouns replace nouns: the backpack → it; the students → they; my friend and I → we.'),('Compound words','A compound word joins two words to make one idea: tooth + brush = toothbrush.')] y=245*mm for i,(title,body) in enumerate(boxes): bg,ac=colors[i%len(colors)];c.setFillColor(bg);c.roundRect(18*mm,y-29*mm,174*mm,25*mm,5*mm,fill=1,stroke=0) c.setFillColor(ac);c.setFont('Helvetica-Bold',12);c.drawString(24*mm,y-13*mm,title) c.setFillColor(HexColor('#1F2937'));c.setFont('Helvetica',10.5) yy=y-19*mm for line in wrap(body,'Helvetica',10.5,155*mm):c.drawString(24*mm,yy,line);yy-=5*mm y-=36*mm c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',16);c.drawString(18*mm,75*mm,'Reading tip') c.setFillColor(HexColor('#334155'));c.setFont('Helvetica',10.5) for j,line in enumerate(wrap('The compound word appears in bold on the next pages. The question and answer use only the present simple or present continuous.', 'Helvetica',10.5,170*mm)):c.drawString(18*mm,(67-j*5)*mm,line) foot(2,4);c.showPage() # cards 8 + 7 across pages for page, subset in [(3,items[:8]),(4,items[8:])]: c.setFillColor(HexColor('#F8FAFC'));c.rect(0,0,W,H,fill=1,stroke=0) c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',20);c.drawString(18*mm,272*mm, 'Conversation Questions and Answers') y=256*mm offset=0 if page==3 else 8 for n,(q,a,tense) in enumerate(subset,start=offset+1): bg,ac=colors[(n-1)%5]; h=28*mm c.setFillColor(bg);c.roundRect(18*mm,y-h,174*mm,h,4*mm,fill=1,stroke=0) c.setFillColor(ac);c.roundRect(18*mm,y-h,18*mm,h,4*mm,fill=1,stroke=0) c.setFillColor(white);c.setFont('Helvetica-Bold',16);c.drawCentredString(27*mm,y-16*mm,str(n)) c.setFillColor(ac);c.setFont('Helvetica-Bold',8.5);c.drawString(42*mm,y-7*mm,tense.upper()) c.setFillColor(HexColor('#172554'));c.setFont('Helvetica-Bold',10.3) qlines=wrap('Q. '+q,'Helvetica-Bold',10.3,142*mm) yy=y-13*mm for line in qlines:c.drawString(42*mm,yy,line);yy-=4.6*mm c.setFillColor(HexColor('#1F2937'));c.setFont('Helvetica',9.8) for line in wrap('A. '+a,'Helvetica',9.8,142*mm):c.drawString(42*mm,yy-1*mm,line);yy-=4.5*mm y-=31*mm if page==4: c.setFillColor(HexColor('#0F766E'));c.setFont('Helvetica-Bold',11);c.drawString(18*mm,30*mm,'Practice challenge: Change one compound word and keep the same tense.') foot(page,4);c.showPage() c.save() r=PdfReader(out) text='\n'.join(p.extract_text() or '' for p in r.pages) print('Created:',out) print('pages=',len(r.pages),'questions=',text.count('Q. '),'bytes=',os.path.getsize(out)) assert len(r.pages)==4 and text.count('Q. ')==15 PY
Compound Words Conversation Handbook
PDF Document · PDF
Just make a small change in the colorful handbook pdf prepared, all the compound words used in conversation part please put them in a box and make list of those compound words like example " play + ground " - playground.
~/
compound words worksheet play ground playground examples
~/compound-words-handbook/output
python - <<'PY' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import A4 from reportlab.lib.colors import HexColor, white from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.units import mm from pypdf import PdfReader import os out='/tmp/workspace/compound-words-handbook/output/Compound_Words_Conversation_Handbook_Updated.pdf' items=[ ('What do you usually do with your','toothbrush','?','I use it every morning and every night.','Present simple','tooth + brush'), ('Is she carrying her','backpack','now?','Yes, she is carrying it to the classroom now.','Present continuous','back + pack'), ('Where does he keep his','notebook','?','He keeps it on his desk.','Present simple','note + book'), ('Are they watching the','sunset','now?','Yes, they are watching it from the beach.','Present continuous','sun + set'), ('Does your brother clean his','bedroom','every week?','Yes, he cleans it every Saturday.','Present simple','bed + room'), ('Why are you wearing your','raincoat','today?','I am wearing it because it is raining.','Present continuous','rain + coat'), ('What does she put in the','mailbox','every morning?','She puts the letters in it.','Present simple','mail + box'), ('Is he waiting at the','bus stop','now?','Yes, he is waiting there with his friend.','Present continuous','bus + stop'), ('When do they eat','breakfast','?','They eat it before school.','Present simple','break + fast'), ('Are we using the','classroom','now?','Yes, we are using it for our English lesson.','Present continuous','class + room'), ('What does it show on the','website','?','It shows the school timetable.','Present simple','web + site'), ('Is she holding an','umbrella','now?','Yes, she is holding it near the door.','Present continuous','umbrella (single word, not a compound word)'), ('Who checks the','homework','every day?','Our teacher checks it after class.','Present simple','home + work'), ('Are you reading the','newspaper','now?','No, I am reading it after dinner.','Present continuous','news + paper'), ('Does he use the','playground','after lunch?','Yes, he uses it with his classmates.','Present simple','play + ground')] # Correction: umbrella isn't a compound word. Retain in conversation but mark as vocabulary rather than claim; all compound terms are boxed. colors=[(HexColor('#DBEAFE'),HexColor('#2563EB')),(HexColor('#DCFCE7'),HexColor('#16A34A')),(HexColor('#FCE7F3'),HexColor('#DB2777')),(HexColor('#FEF3C7'),HexColor('#D97706')),(HexColor('#EDE9FE'),HexColor('#7C3AED'))] W,H=A4 c=canvas.Canvas(out,pagesize=A4); c.setTitle('Compound Words Conversation Handbook - Updated') def foot(page,total): c.setFillColor(HexColor('#475569'));c.setFont('Helvetica',8);c.drawString(18*mm,10*mm,'Compound Words Conversation Handbook');c.drawRightString(W-18*mm,10*mm,f'Page {page} of {total}') def wrap(text,font,size,width): words=text.split(); out=[]; cur='' for word in words: test=(cur+' '+word).strip() if stringWidth(test,font,size)<=width: cur=test else: out.append(cur);cur=word if cur:out.append(cur) return out def boxed_phrase(x,y,prefix,word,suffix,limit=142*mm): # baseline y. wraps only prefix/suffix as designed short. c.setFont('Helvetica-Bold',10.3); c.setFillColor(HexColor('#172554')) c.drawString(x,y,'Q. '+prefix+' ') px=x+stringWidth('Q. '+prefix+' ','Helvetica-Bold',10.3) ww=stringWidth(word,'Helvetica-Bold',10.3)+6*mm c.setFillColor(HexColor('#FFFFFF')); c.roundRect(px-2*mm,y-3.7*mm,ww,6.3*mm,2*mm,fill=1,stroke=0) c.setStrokeColor(HexColor('#0F766E'));c.setLineWidth(.8);c.roundRect(px-2*mm,y-3.7*mm,ww,6.3*mm,2*mm,fill=0,stroke=1) c.setFillColor(HexColor('#065F46'));c.drawString(px+1*mm,y,word) c.setFillColor(HexColor('#172554'));c.drawString(px+ww+1*mm,y,' '+suffix) # cover c.setFillColor(HexColor('#F0F9FF'));c.rect(0,0,W,H,fill=1,stroke=0) for x,y,r,col in [(35,750,48,'#BAE6FD'),(520,710,58,'#C4B5FD'),(500,180,50,'#FDE68A'),(65,160,40,'#BBF7D0')]:c.setFillColor(HexColor(col));c.circle(x,y,r,fill=1,stroke=0) c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',28);c.drawCentredString(W/2,205*mm,'Compound Words');c.drawCentredString(W/2,192*mm,'Conversation Handbook') c.setFillColor(HexColor('#334155'));c.setFont('Helvetica',14);c.drawCentredString(W/2,176*mm,'15 useful question-and-answer models');c.drawCentredString(W/2,168*mm,'Present simple • Present continuous • Pronouns') c.setFillColor(white);c.roundRect(30*mm,80*mm,150*mm,66*mm,10*mm,fill=1,stroke=0) c.setFillColor(HexColor('#1E3A5F'));c.setFont('Helvetica-Bold',14);c.drawString(42*mm,134*mm,'New feature') c.setFillColor(HexColor('#334155'));c.setFont('Helvetica',11); y=124*mm for s in ['• Every target compound word is highlighted in a box.','• A reference list shows how each word is built.','• Read, answer, and make your own conversations.']: c.drawString(43*mm,y,s);y-=9*mm c.setFillColor(HexColor('#0F766E'));c.setFont('Helvetica-Bold',11);c.drawCentredString(W/2,60*mm,'Example: play + ground = playground') foot(1,5);c.showPage() # grammar c.setFillColor(HexColor('#FFFDF5'));c.rect(0,0,W,H,fill=1,stroke=0);c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',23);c.drawString(18*mm,270*mm,'Quick Grammar Guide') boxes=[('Present simple','Use it for habits, routines, and facts. Example: She cleans it every Saturday.'),('Present continuous','Use it for actions happening now. Form: am / is / are + verb-ing.'),('Pronouns','Pronouns replace nouns: the backpack → it; the students → they.'),('Boxed vocabulary','The green box marks the compound word used in each conversation.')] y=245*mm for i,(t,b) in enumerate(boxes): bg,ac=colors[i];c.setFillColor(bg);c.roundRect(18*mm,y-29*mm,174*mm,25*mm,5*mm,fill=1,stroke=0);c.setFillColor(ac);c.setFont('Helvetica-Bold',12);c.drawString(24*mm,y-13*mm,t);c.setFillColor(HexColor('#1F2937'));c.setFont('Helvetica',10.5);c.drawString(24*mm,y-20*mm,b);y-=36*mm c.setFillColor(HexColor('#0F766E'));c.roundRect(18*mm,68*mm,174*mm,30*mm,5*mm,fill=1,stroke=0);c.setFillColor(white);c.setFont('Helvetica-Bold',13);c.drawString(25*mm,86*mm,'Notice the green box') c.setFont('Helvetica',10.5);c.drawString(25*mm,77*mm,'It helps you see the compound word quickly while you speak.') foot(2,5);c.showPage() # conversations for page,subset,start in [(3,items[:8],1),(4,items[8:],9)]: c.setFillColor(HexColor('#F8FAFC'));c.rect(0,0,W,H,fill=1,stroke=0);c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',20);c.drawString(18*mm,272*mm,'Conversation Questions and Answers') y=256*mm for n,(prefix,word,suffix,ans,tense,parts) in enumerate(subset,start=start): bg,ac=colors[(n-1)%5];h=28*mm;c.setFillColor(bg);c.roundRect(18*mm,y-h,174*mm,h,4*mm,fill=1,stroke=0);c.setFillColor(ac);c.roundRect(18*mm,y-h,18*mm,h,4*mm,fill=1,stroke=0);c.setFillColor(white);c.setFont('Helvetica-Bold',16);c.drawCentredString(27*mm,y-16*mm,str(n));c.setFillColor(ac);c.setFont('Helvetica-Bold',8.5);c.drawString(42*mm,y-7*mm,tense.upper()) boxed_phrase(42*mm,y-13*mm,prefix,word,suffix) c.setFillColor(HexColor('#1F2937'));c.setFont('Helvetica',9.8); yy=y-20*mm for line in wrap('A. '+ans,'Helvetica',9.8,142*mm):c.drawString(42*mm,yy,line);yy-=4.5*mm y-=31*mm foot(page,5);c.showPage() # word list c.setFillColor(HexColor('#F0FDFA'));c.rect(0,0,W,H,fill=1,stroke=0);c.setFillColor(HexColor('#102A43'));c.setFont('Helvetica-Bold',22);c.drawString(18*mm,270*mm,'Compound Word List') c.setFillColor(HexColor('#334155'));c.setFont('Helvetica',10.5);c.drawString(18*mm,262*mm,'The boxed target words from the conversations are listed below.') entries=[('tooth + brush','toothbrush'),('back + pack','backpack'),('note + book','notebook'),('sun + set','sunset'),('bed + room','bedroom'),('rain + coat','raincoat'),('mail + box','mailbox'),('bus + stop','bus stop'),('break + fast','breakfast'),('class + room','classroom'),('web + site','website'),('home + work','homework'),('news + paper','newspaper'),('play + ground','playground')] y=246*mm for i,(parts,whole) in enumerate(entries): col=i%2; row=i//2; x=(18 if col==0 else 106)*mm; yy=246*mm-row*28*mm bg,ac=colors[i%5];c.setFillColor(bg);c.roundRect(x,yy-22*mm,82*mm,19*mm,4*mm,fill=1,stroke=0);c.setFillColor(HexColor('#334155'));c.setFont('Helvetica',9.5);c.drawString(x+4*mm,yy-9*mm,parts+' =') c.setFillColor(white); ww=stringWidth(whole,'Helvetica-Bold',10.5)+10*mm;c.roundRect(x+4*mm,yy-18*mm,ww,6.7*mm,2*mm,fill=1,stroke=0);c.setStrokeColor(ac);c.roundRect(x+4*mm,yy-18*mm,ww,6.7*mm,2*mm,fill=0,stroke=1);c.setFillColor(ac);c.setFont('Helvetica-Bold',10.5);c.drawString(x+7*mm,yy-16*mm,whole) c.setFillColor(HexColor('#475569'));c.setFont('Helvetica-Oblique',9);c.drawString(18*mm,36*mm,'Note: “umbrella” appears in Conversation 12, but it is not a compound word, so it is not in this list.') c.setFillColor(HexColor('#0F766E'));c.setFont('Helvetica-Bold',10.5);c.drawString(18*mm,28*mm,'Practice: Cover the right side, say the two smaller words, then name the compound word.') foot(5,5);c.showPage();c.save() r=PdfReader(out);txt='\n'.join(p.extract_text() or '' for p in r.pages) print('pages=',len(r.pages),'question count=',txt.count('Q. '),'size=',os.path.getsize(out));assert len(r.pages)==5 and txt.count('Q. ')==15 PY
Compound Words Conversation Handbook Updated
PDF Document · PDF