Please write the answers to the following questions written in fashion as active to passive voice and passive to active voice,just be careful don't just write answers of questions in active to passive voice and vice versa but practical life answers for conversation.You aresmarr enough to understand what I mean.
~/
~/attachments/845379bc-97d6-4325-94da-838a1503e8a1
active passive voice conversational English practical examples grammar
python -c "from pypdf import PdfReader; p='/tmp/workspace/attachments/845379bc-97d6-4325-94da-838a1503e8a1/DOC-20260908-WA0034.pdf'; r=PdfReader(p); print('PAGES',len(r.pages)); [print('\\n--- PAGE',i+1,'---\\n',page.extract_text() or '[NO EXTRACTABLE TEXT]') for i,page in enumerate(r.pages)]"
Please create some following changes and then make a colorful handbook pdf.Work on my command any answer should not start with question words please just write real life practical conversation answers for speaking.
~/
mkdir -p "/tmp/workspace/voice-conversation-handbook/src" "/tmp/workspace/voice-conversation-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.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, KeepTogether from reportlab.lib.units import cm from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.colors import HexColor from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.fonts import addMapping from reportlab.pdfgen import canvas from reportlab.lib.utils import ImageReader out='/tmp/workspace/voice-conversation-handbook/output/Practical_Active_Passive_Conversation_Handbook.pdf' # All entries are replies / statements, intentionally not questions. passive = [ ('Negotiation', 'The negotiation will be chaired by our appointed moderator tomorrow.'), ('Board decision', 'The vote was postponed by the board because more information was needed.'), ('Research', 'The results are being verified by the research team at the moment.'), ('Briefing', 'The briefing note has been prepared by the communications department.'), ('Report', 'The final report will be published by the team on Friday.'), ('Security', 'The security flaw has been resolved by the engineers.'), ('Budget', 'The budget had already been approved before the merger.'), ('Policy', 'The policy is being revised now to reflect the new rules.'), ('Recommendation', 'The recommendation could be reconsidered by the panel next week.'), ('Applicants', 'The applicants should be notified about the delay today.'), ('Audit', 'A few irregularities were identified by the auditors.'), ('Media', 'The statement might be interpreted differently by the media.'), ('Witnesses', 'Several witnesses have been excluded from the review.'), ('Agency', 'The findings will be released by the agency next week.'), ('Agreement', 'The implementation of the agreement is being monitored closely.'), ('Editing', 'The disputed paragraph was removed by the editor.'), ('Proposal', 'The earlier proposal had been rejected by the committee.'), ('Delivery', 'The delivery date can be guaranteed by the company.'), ('Schedule', 'The delegates were given the updated schedule this morning.'), ('Contract', 'The candidate has been offered a revised contract.'), ('Public feedback', 'The public is being asked to comment before the deadline.'), ('Complaint', 'The complaint was dealt with last month.'), ('Evidence', 'This evidence should be treated with caution.'), ('Change', 'You were informed about the change by email.'), ('Keynote', 'The keynote address is expected to be delivered by the invited speaker.'), ('Minister', 'It is widely believed that the minister will resign.'), ('Error', 'The error could have been prevented with an extra check.'), ('Investigation', 'The investigation will have been completed by the end of the month.'), ('Agreement', 'The agreement must be signed before midnight.'), ('Proposal', 'The proposal was turned down after the discussion.'), ('Winners', 'The winners are going to be announced tonight.'), ('Software', 'The new software has been installed by the technicians.'), ('Interviews', 'The witnesses were being interviewed by the team.'), ('Memo', 'The confidential memo could have been leaked by someone.'), ('Impact', 'The long-term impact will be evaluated after six months.'), ] active = [ ('Negotiation', 'Our appointed moderator will chair the negotiation tomorrow.'), ('Board decision', 'The board postponed the vote because it needed more information.'), ('Research', 'The research team is verifying the results at the moment.'), ('Briefing', 'The communications department has prepared the briefing note.'), ('Report', 'The team will publish the final report on Friday.'), ('Security', 'The engineers have resolved the security flaw.'), ('Budget', 'The directors had already approved the budget before the merger.'), ('Policy', 'The team is revising the policy now to reflect the new rules.'), ('Recommendation', 'The panel could reconsider the recommendation next week.'), ('Applicants', 'The recruitment team should notify the applicants about the delay today.'), ('Audit', 'The auditors identified a few irregularities.'), ('Media', 'The media might interpret the statement differently.'), ('Witnesses', 'The review team has excluded several witnesses from the review.'), ('Agency', 'The agency will release the findings next week.'), ('Agreement', 'Our project lead is monitoring the implementation of the agreement closely.'), ('Editing', 'The editor removed the disputed paragraph.'), ('Proposal', 'The committee had rejected the earlier proposal.'), ('Delivery', 'The company can guarantee the delivery date.'), ('Schedule', 'The organisers gave the delegates the updated schedule this morning.'), ('Contract', 'The company has offered the candidate a revised contract.'), ('Public feedback', 'The organisers are asking the public to comment before the deadline.'), ('Complaint', 'Customer support dealt with the complaint last month.'), ('Evidence', 'We should treat this evidence with caution.'), ('Change', 'We informed you about the change by email.'), ('Keynote', 'The invited speaker is expected to deliver the keynote address.'), ('Minister', 'Many people believe that the minister will resign.'), ('Error', 'The team could have prevented the error with an extra check.'), ('Investigation', 'The team will have completed the investigation by the end of the month.'), ('Agreement', 'The parties must sign the agreement before midnight.'), ('Proposal', 'The committee turned down the proposal after the discussion.'), ('Winners', 'The host is going to announce the winners tonight.'), ('Software', 'The technicians have installed the new software.'), ('Interviews', 'The team was interviewing the witnesses.'), ('Memo', 'Someone could have leaked the confidential memo.'), ('Impact', 'The team will evaluate the long-term impact after six months.'), ] 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): page_count=len(self.pages) for state in self.pages: self.__dict__.update(state) self.setFillColor(HexColor('#0C4A6E')) self.setFont('Helvetica-Bold', 8.5) self.drawString(1.55*cm, 1.0*cm, 'Practical Active & Passive Voice') self.setFillColor(HexColor('#64748B')) self.setFont('Helvetica', 8.5) self.drawRightString(19.45*cm, 1.0*cm, f'Page {self._pageNumber} of {page_count}') self.showPage() canvas.Canvas.save(self) styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='TitleCustom', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=29, leading=34, alignment=TA_CENTER, textColor=HexColor('#FFFFFF'), spaceAfter=12)) styles.add(ParagraphStyle(name='Subtitle', parent=styles['Normal'], fontName='Helvetica', fontSize=13, leading=18, alignment=TA_CENTER, textColor=HexColor('#E0F2FE'))) styles.add(ParagraphStyle(name='H1Custom', parent=styles['Heading1'], fontName='Helvetica-Bold', fontSize=20, leading=24, textColor=HexColor('#0F766E'), spaceBefore=4, spaceAfter=9)) styles.add(ParagraphStyle(name='BodyCustom', parent=styles['BodyText'], fontName='Helvetica', fontSize=10.4, leading=14, textColor=HexColor('#1E293B'), spaceAfter=7)) styles.add(ParagraphStyle(name='Small', parent=styles['BodyText'], fontName='Helvetica', fontSize=8.9, leading=11.8, textColor=HexColor('#334155'))) styles.add(ParagraphStyle(name='Example', parent=styles['BodyText'], fontName='Helvetica', fontSize=10.2, leading=13.4, textColor=HexColor('#1E293B'))) story=[] # cover cover = Table([[Paragraph('PRACTICAL<br/>ACTIVE & PASSIVE<br/>VOICE', styles['TitleCustom'])], [Paragraph('A colourful speaking handbook with natural, real-life replies', styles['Subtitle'])]], colWidths=[17.5*cm], rowHeights=[6.3*cm,1.7*cm]) cover.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#0F766E')),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('LEFTPADDING',(0,0),(-1,-1),20),('RIGHTPADDING',(0,0),(-1,-1),20),('TOPPADDING',(0,0),(-1,-1),18),('BOTTOMPADDING',(0,0),(-1,-1),18)])) story += [Spacer(1,4.3*cm),cover,Spacer(1,0.8*cm)] intro=Table([[Paragraph('<b>Speaking rule</b><br/>Every model in this handbook is a complete reply. None begins with a question word. Use these lines when you need to give information clearly in a meeting, office, school, interview, or daily conversation.', styles['BodyCustom'])]],colWidths=[17.5*cm]) intro.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('BOX',(0,0),(-1,-1),0.8,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),16),('RIGHTPADDING',(0,0),(-1,-1),16),('TOPPADDING',(0,0),(-1,-1),12),('BOTTOMPADDING',(0,0),(-1,-1),12)])) story.append(intro); story.append(PageBreak()) # guide page story.append(Paragraph('How to choose the right voice',styles['H1Custom'])) info = [ ('<b>Use active voice</b><br/>Name the person or group doing the action. It sounds direct and natural: <i>The team will publish the report.</i>'), ('<b>Use passive voice</b><br/>Focus on the result, object, or action. It is useful if the doer is unknown or less important: <i>The report will be published on Friday.</i>'), ('<b>Natural reply pattern</b><br/>Start with the useful information, not a question word: <i>The report will be ready tomorrow.</i>'), ('<b>Good speaking habit</b><br/>Drop “by someone” when it is obvious or unnecessary. Say <i>The door was locked</i>, not <i>The door was locked by someone.</i>'), ] for i,t in enumerate(info): box=Table([[Paragraph(t,styles['BodyCustom'])]],colWidths=[17.5*cm]) palette=[('#E0F2FE','#0284C7'),('#DCFCE7','#16A34A'),('#FCE7F3','#DB2777'),('#F3E8FF','#7E22CE')][i] box.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor(palette[0])),('LINEBEFORE',(0,0),(0,-1),5,HexColor(palette[1])),('LEFTPADDING',(0,0),(-1,-1),14),('RIGHTPADDING',(0,0),(-1,-1),14),('TOPPADDING',(0,0),(-1,-1),9),('BOTTOMPADDING',(0,0),(-1,-1),9)])) story += [box,Spacer(1,0.28*cm)] story.append(Spacer(1,0.2*cm)) story.append(Paragraph('Quick formula',styles['H1Custom'])) formula=Table([ [Paragraph('<b>Active</b>',styles['BodyCustom']),Paragraph('<b>Person / group + action + result</b><br/>The engineers fixed the issue.',styles['BodyCustom'])], [Paragraph('<b>Passive</b>',styles['BodyCustom']),Paragraph('<b>Result + be + past participle (+ by person / group)</b><br/>The issue was fixed by the engineers.',styles['BodyCustom'])] ],colWidths=[4*cm,13.5*cm]) formula.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),HexColor('#CCFBF1')),('BACKGROUND',(0,1),(-1,1),HexColor('#ECFEFF')),('GRID',(0,0),(-1,-1),0.5,HexColor('#99F6E4')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),10),('RIGHTPADDING',(0,0),(-1,-1),10),('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8)])) story += [formula,PageBreak()] def make_section(title, label, data, shade, accent): story.append(Paragraph(title,styles['H1Custom'])) story.append(Paragraph('Use these as complete answers in real conversations. The wording is practical, polite, and natural for speaking.',styles['BodyCustom'])) for start in range(0,len(data),9): rows=[[Paragraph('<b>No.</b>',styles['Small']),Paragraph('<b>Situation</b>',styles['Small']),Paragraph(f'<b>{label}</b>',styles['Small'])]] for idx,(context,line) in enumerate(data[start:start+9],start+1): rows.append([Paragraph(str(idx),styles['Small']),Paragraph(context,styles['Small']),Paragraph(line,styles['Example'])]) t=Table(rows,colWidths=[1.0*cm,3.2*cm,13.3*cm],repeatRows=1) style=[('BACKGROUND',(0,0),(-1,0),HexColor(accent)),('TEXTCOLOR',(0,0),(-1,0),colors.white),('GRID',(0,0),(-1,-1),0.35,HexColor('#CBD5E1')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6)] for r in range(1,len(rows)): if r%2: style.append(('BACKGROUND',(0,r),(-1,r),HexColor(shade))) t.setStyle(TableStyle(style)); story.append(t) if start+9 < len(data): story.append(PageBreak()); story.append(Paragraph(title+' (continued)',styles['H1Custom'])) story.append(PageBreak()) make_section('Part 1 - Passive voice replies','Passive conversation answer',passive,'#F0FDFA','#0F766E') make_section('Part 2 - Active voice replies','Active conversation answer',active,'#EFF6FF','#1D4ED8') story.append(Paragraph('Final speaking checklist',styles['H1Custom'])) checks=[ 'Begin with the information your listener needs.', 'Use active voice to sound direct: “The team completed the work.”', 'Use passive voice to focus on the result: “The work has been completed.”', 'Keep the doer only when it matters: “The engineer fixed the issue.”', 'Use a time phrase when helpful: “The update will be sent this afternoon.”', ] for c in checks: story.append(Paragraph('• '+c,styles['BodyCustom'])) story.append(Spacer(1,0.5*cm)) closing=Table([[Paragraph('<b>Remember:</b> The best spoken answer is clear, complete, and easy to understand. Start with the result or the person doing the action, rather than beginning with a question word.',styles['BodyCustom'])]],colWidths=[17.5*cm]) closing.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FFEDD5')),('BOX',(0,0),(-1,-1),1,HexColor('#F97316')),('LEFTPADDING',(0,0),(-1,-1),13),('RIGHTPADDING',(0,0),(-1,-1),13),('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10)])) story.append(closing) doc=SimpleDocTemplate(out,pagesize=A4,rightMargin=1.55*cm,leftMargin=1.55*cm,topMargin=1.4*cm,bottomMargin=1.55*cm,title='Practical Active and Passive Voice Conversation Handbook',author='Orris') doc.build(story,canvasmaker=NumberedCanvas) print(out) PY python -c "from pypdf import PdfReader; p='/tmp/workspace/voice-conversation-handbook/output/Practical_Active_Passive_Conversation_Handbook.pdf'; r=PdfReader(p); print('pages=',len(r.pages),'size=',__import__('os').path.getsize(p)); print(r.pages[0].extract_text()[:280]); print(r.pages[-1].extract_text()[:300])"
Read timeout on endpoint URL: "https://bedrock-agentcore.ap-south-1.amazonaws.com/code-interpreters/orris_code_interpreter-jiK9AacE5I/tools/invoke"
We encountered an error while processing your request. Please try again or reach out to us for help.
Read timeout on endpoint URL: "https://bedrock-agentcore.ap-south-1.amazonaws.com/code-interpreters/orris_code_interpreter-jiK9AacE5I/tools/invoke"
We encountered an error while processing your request. Please try again or reach out to us for help.
Please create some following changes and then make a colorful handbook pdf.Work on my command any answer should not start with question words please just write real life practical conversation answers for speaking.
~/
mkdir -p "/tmp/workspace/voice-conversation-handbook/src" "/tmp/workspace/voice-conversation-handbook/output"; python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.units import cm from reportlab.pdfgen import canvas from pypdf import PdfReader import os out='/tmp/workspace/voice-conversation-handbook/output/Practical_Active_Passive_Conversation_Handbook.pdf' passive=[ ('Negotiation','The negotiation will be chaired by our appointed moderator tomorrow.'),('Board decision','The vote was postponed by the board because more information was needed.'),('Research','The results are being verified by the research team at the moment.'),('Briefing','The briefing note has been prepared by the communications department.'),('Report','The final report will be published by the team on Friday.'),('Security','The security flaw has been resolved by the engineers.'),('Budget','The budget had already been approved before the merger.'),('Policy','The policy is being revised now to reflect the new rules.'),('Recommendation','The recommendation could be reconsidered by the panel next week.'),('Applicants','The applicants should be notified about the delay today.'),('Audit','A few irregularities were identified by the auditors.'),('Media','The statement might be interpreted differently by the media.'),('Witnesses','Several witnesses have been excluded from the review.'),('Agency','The findings will be released by the agency next week.'),('Agreement','The implementation of the agreement is being monitored closely.'),('Editing','The disputed paragraph was removed by the editor.'),('Proposal','The earlier proposal had been rejected by the committee.'),('Delivery','The delivery date can be guaranteed by the company.'),('Schedule','The delegates were given the updated schedule this morning.'),('Contract','The candidate has been offered a revised contract.'),('Public feedback','The public is being asked to comment before the deadline.'),('Complaint','The complaint was dealt with last month.'),('Evidence','This evidence should be treated with caution.'),('Change','You were informed about the change by email.'),('Keynote','The keynote address is expected to be delivered by the invited speaker.'),('Minister','It is widely believed that the minister will resign.'),('Error','The error could have been prevented with an extra check.'),('Investigation','The investigation will have been completed by the end of the month.'),('Agreement','The agreement must be signed before midnight.'),('Proposal','The proposal was turned down after the discussion.'),('Winners','The winners are going to be announced tonight.'),('Software','The new software has been installed by the technicians.'),('Interviews','The witnesses were being interviewed by the team.'),('Memo','The confidential memo could have been leaked by someone.'),('Impact','The long-term impact will be evaluated after six months.')] active=[ ('Negotiation','Our appointed moderator will chair the negotiation tomorrow.'),('Board decision','The board postponed the vote because it needed more information.'),('Research','The research team is verifying the results at the moment.'),('Briefing','The communications department has prepared the briefing note.'),('Report','The team will publish the final report on Friday.'),('Security','The engineers have resolved the security flaw.'),('Budget','The directors had already approved the budget before the merger.'),('Policy','The team is revising the policy now to reflect the new rules.'),('Recommendation','The panel could reconsider the recommendation next week.'),('Applicants','The recruitment team should notify the applicants about the delay today.'),('Audit','The auditors identified a few irregularities.'),('Media','The media might interpret the statement differently.'),('Witnesses','The review team has excluded several witnesses from the review.'),('Agency','The agency will release the findings next week.'),('Agreement','Our project lead is monitoring the implementation of the agreement closely.'),('Editing','The editor removed the disputed paragraph.'),('Proposal','The committee had rejected the earlier proposal.'),('Delivery','The company can guarantee the delivery date.'),('Schedule','The organisers gave the delegates the updated schedule this morning.'),('Contract','The company has offered the candidate a revised contract.'),('Public feedback','The organisers are asking the public to comment before the deadline.'),('Complaint','Customer support dealt with the complaint last month.'),('Evidence','We should treat this evidence with caution.'),('Change','We informed you about the change by email.'),('Keynote','The invited speaker is expected to deliver the keynote address.'),('Minister','Many people believe that the minister will resign.'),('Error','The team could have prevented the error with an extra check.'),('Investigation','The team will have completed the investigation by the end of the month.'),('Agreement','The parties must sign the agreement before midnight.'),('Proposal','The committee turned down the proposal after the discussion.'),('Winners','The host is going to announce the winners tonight.'),('Software','The technicians have installed the new software.'),('Interviews','The team was interviewing the witnesses.'),('Memo','Someone could have leaked the confidential memo.'),('Impact','The team will evaluate the long-term impact after six months.')] class Footer(canvas.Canvas): def __init__(self,*a,**k): super().__init__(*a,**k);self.states=[] def showPage(self): self.states.append(dict(self.__dict__));self._startPage() def save(self): n=len(self.states) for s in self.states: self.__dict__.update(s);self.setFont('Helvetica-Bold',8);self.setFillColor(HexColor('#0F766E'));self.drawString(1.5*cm,0.9*cm,'Practical Active & Passive Voice');self.setFillColor(HexColor('#64748B'));self.setFont('Helvetica',8);self.drawRightString(19.5*cm,0.9*cm,f'Page {self._pageNumber} of {n}');super().showPage() super().save() S=getSampleStyleSheet() S.add(ParagraphStyle(name='TitleX',parent=S['Title'],fontName='Helvetica-Bold',fontSize=27,leading=31,alignment=TA_CENTER,textColor=colors.white)) S.add(ParagraphStyle(name='SubX',parent=S['Normal'],fontSize=12,leading=16,alignment=TA_CENTER,textColor=HexColor('#E0F2FE'))) S.add(ParagraphStyle(name='HeadX',parent=S['Heading1'],fontName='Helvetica-Bold',fontSize=19,leading=24,textColor=HexColor('#0F766E'),spaceAfter=8)) S.add(ParagraphStyle(name='BodyX',parent=S['BodyText'],fontSize=10.2,leading=13.5,textColor=HexColor('#1E293B'))) S.add(ParagraphStyle(name='CellX',parent=S['BodyText'],fontSize=9.1,leading=11.5,textColor=HexColor('#1E293B'))) story=[] cover=Table([[Paragraph('PRACTICAL<br/>ACTIVE & PASSIVE<br/>VOICE',S['TitleX'])],[Paragraph('A colourful handbook of natural, real-life speaking replies',S['SubX'])]],colWidths=[17.5*cm],rowHeights=[6.5*cm,1.8*cm]) cover.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#0F766E')),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('TOPPADDING',(0,0),(-1,-1),16),('BOTTOMPADDING',(0,0),(-1,-1),16)])) story += [Spacer(1,4.2*cm),cover,Spacer(1,.8*cm)] box=Table([[Paragraph('<b>Speaking rule:</b> Every model in this handbook is a complete reply. Each answer starts with useful information, not with a question word. Use the lines in everyday conversations, meetings, schools, and workplaces.',S['BodyX'])]],colWidths=[17.5*cm]) box.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('BOX',(0,0),(-1,-1),.8,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),14),('RIGHTPADDING',(0,0),(-1,-1),14),('TOPPADDING',(0,0),(-1,-1),12),('BOTTOMPADDING',(0,0),(-1,-1),12)]));story += [box,PageBreak()] story += [Paragraph('Use voice naturally',S['HeadX']),Paragraph('Active voice names the person or group doing the action. Passive voice focuses on the result, action, or thing affected. Both forms are useful in speech when they sound clear and relevant.',S['BodyX']),Spacer(1,.35*cm)] for text,bg,edge in [('Active: <b>The team completed the work.</b> Direct and clear.','#E0F2FE','#0284C7'),('Passive: <b>The work has been completed.</b> Focuses on the result.','#DCFCE7','#16A34A'),('Natural reply: <b>The update will be sent this afternoon.</b> Starts with information, not a question word.','#FCE7F3','#DB2777')]: t=Table([[Paragraph(text,S['BodyX'])]],colWidths=[17.5*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor(bg)),('LINEBEFORE',(0,0),(0,-1),5,HexColor(edge)),('LEFTPADDING',(0,0),(-1,-1),12),('RIGHTPADDING',(0,0),(-1,-1),12),('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10)]));story += [t,Spacer(1,.25*cm)] story.append(PageBreak()) def section(title,label,data,head,bg): story.append(Paragraph(title,S['HeadX']));story.append(Paragraph('These are complete, practical answers for speaking. No reply below begins with a question word.',S['BodyX']));story.append(Spacer(1,.2*cm)) for start in range(0,len(data),10): rows=[[Paragraph('<b>No.</b>',S['CellX']),Paragraph('<b>Situation</b>',S['CellX']),Paragraph('<b>'+label+'</b>',S['CellX'])]] for j,(context,line) in enumerate(data[start:start+10],start+1): rows.append([Paragraph(str(j),S['CellX']),Paragraph(context,S['CellX']),Paragraph(line,S['CellX'])]) t=Table(rows,colWidths=[.9*cm,3.1*cm,13.5*cm],repeatRows=1) ts=[('BACKGROUND',(0,0),(-1,0),HexColor(head)),('TEXTCOLOR',(0,0),(-1,0),colors.white),('GRID',(0,0),(-1,-1),.35,HexColor('#CBD5E1')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)] for r in range(1,len(rows)): if r%2: ts.append(('BACKGROUND',(0,r),(-1,r),HexColor(bg))) t.setStyle(TableStyle(ts));story.append(t) if start+10<len(data): story += [PageBreak(),Paragraph(title+' (continued)',S['HeadX'])] story.append(PageBreak()) section('Part 1 - Passive voice replies','Passive reply',passive,'#0F766E','#F0FDFA') section('Part 2 - Active voice replies','Active reply',active,'#1D4ED8','#EFF6FF') story += [Paragraph('Speaking checklist',S['HeadX'])] for x in ['Start with the main information.','Use active voice when the doer matters.','Use passive voice when the result matters more.','Leave out “by someone” if it adds no useful information.','Add a time phrase to make the answer more helpful.']: story.append(Paragraph('• '+x,S['BodyX'])) doc=SimpleDocTemplate(out,pagesize=A4,leftMargin=1.5*cm,rightMargin=1.5*cm,topMargin=1.35*cm,bottomMargin=1.5*cm,title='Practical Active and Passive Voice Conversation Handbook') doc.build(story,canvasmaker=Footer) r=PdfReader(out);print(f'CREATED {out}\nPAGES {len(r.pages)}\nSIZE {os.path.getsize(out)}\nFIRST {r.pages[0].extract_text()[:100]}') PY
python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.colors import HexColor from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.units import cm from reportlab.pdfgen import canvas from pypdf import PdfReader import os out='/tmp/workspace/voice-conversation-handbook/output/Practical_Active_Passive_Conversation_Handbook.pdf' passive=[('Negotiation','The negotiation will be chaired by our appointed moderator tomorrow.'),('Board decision','The vote was postponed by the board because more information was needed.'),('Research','The results are being verified by the research team at the moment.'),('Briefing','The briefing note has been prepared by the communications department.'),('Report','The final report will be published by the team on Friday.'),('Security','The security flaw has been resolved by the engineers.'),('Budget','The budget had already been approved before the merger.'),('Policy','The policy is being revised now to reflect the new rules.'),('Recommendation','The recommendation could be reconsidered by the panel next week.'),('Applicants','The applicants should be notified about the delay today.'),('Audit','A few irregularities were identified by the auditors.'),('Media','The statement might be interpreted differently by the media.'),('Witnesses','Several witnesses have been excluded from the review.'),('Agency','The findings will be released by the agency next week.'),('Agreement','The implementation of the agreement is being monitored closely.'),('Editing','The disputed paragraph was removed by the editor.'),('Proposal','The earlier proposal had been rejected by the committee.'),('Delivery','The delivery date can be guaranteed by the company.'),('Schedule','The delegates were given the updated schedule this morning.'),('Contract','The candidate has been offered a revised contract.'),('Public feedback','The public is being asked to comment before the deadline.'),('Complaint','The complaint was dealt with last month.'),('Evidence','This evidence should be treated with caution.'),('Change','You were informed about the change by email.'),('Keynote','The keynote address is expected to be delivered by the invited speaker.'),('Minister','It is widely believed that the minister will resign.'),('Error','The error could have been prevented with an extra check.'),('Investigation','The investigation will have been completed by the end of the month.'),('Agreement','The agreement must be signed before midnight.'),('Proposal','The proposal was turned down after the discussion.'),('Winners','The winners are going to be announced tonight.'),('Software','The new software has been installed by the technicians.'),('Interviews','The witnesses were being interviewed by the team.'),('Memo','The confidential memo could have been leaked by someone.'),('Impact','The long-term impact will be evaluated after six months.')] active=[('Negotiation','Our appointed moderator will chair the negotiation tomorrow.'),('Board decision','The board postponed the vote because it needed more information.'),('Research','The research team is verifying the results at the moment.'),('Briefing','The communications department has prepared the briefing note.'),('Report','The team will publish the final report on Friday.'),('Security','The engineers have resolved the security flaw.'),('Budget','The directors had already approved the budget before the merger.'),('Policy','The team is revising the policy now to reflect the new rules.'),('Recommendation','The panel could reconsider the recommendation next week.'),('Applicants','The recruitment team should notify the applicants about the delay today.'),('Audit','The auditors identified a few irregularities.'),('Media','The media might interpret the statement differently.'),('Witnesses','The review team has excluded several witnesses from the review.'),('Agency','The agency will release the findings next week.'),('Agreement','Our project lead is monitoring the implementation of the agreement closely.'),('Editing','The editor removed the disputed paragraph.'),('Proposal','The committee had rejected the earlier proposal.'),('Delivery','The company can guarantee the delivery date.'),('Schedule','The organisers gave the delegates the updated schedule this morning.'),('Contract','The company has offered the candidate a revised contract.'),('Public feedback','The organisers are asking the public to comment before the deadline.'),('Complaint','Customer support dealt with the complaint last month.'),('Evidence','We should treat this evidence with caution.'),('Change','We informed you about the change by email.'),('Keynote','The invited speaker is expected to deliver the keynote address.'),('Minister','Many people believe that the minister will resign.'),('Error','The team could have prevented the error with an extra check.'),('Investigation','The team will have completed the investigation by the end of the month.'),('Agreement','The parties must sign the agreement before midnight.'),('Proposal','The committee turned down the proposal after the discussion.'),('Winners','The host is going to announce the winners tonight.'),('Software','The technicians have installed the new software.'),('Interviews','The team was interviewing the witnesses.'),('Memo','Someone could have leaked the confidential memo.'),('Impact','The team will evaluate the long-term impact after six months.')] class Footer(canvas.Canvas): def __init__(self,*a,**k): super().__init__(*a,**k);self.states=[] def showPage(self): self.states.append(dict(self.__dict__));self._startPage() def save(self): for s in self.states: self.__dict__.update(s);self.setFont('Helvetica-Bold',8);self.setFillColor(HexColor('#0F766E'));self.drawString(1.5*cm,.9*cm,'Practical Active & Passive Voice');self.setFillColor(HexColor('#64748B'));self.setFont('Helvetica',8);self.drawRightString(19.5*cm,.9*cm,f'Page {self._pageNumber} of {len(self.states)}');super().showPage() super().save() S=getSampleStyleSheet();S.add(ParagraphStyle(name='TitleX',parent=S['Title'],fontName='Helvetica-Bold',fontSize=27,leading=31,alignment=TA_CENTER,textColor=colors.white));S.add(ParagraphStyle(name='SubX',parent=S['Normal'],fontSize=12,leading=16,alignment=TA_CENTER,textColor=HexColor('#E0F2FE')));S.add(ParagraphStyle(name='HeadX',parent=S['Heading1'],fontName='Helvetica-Bold',fontSize=19,leading=24,textColor=HexColor('#0F766E'),spaceAfter=8));S.add(ParagraphStyle(name='BodyX',parent=S['BodyText'],fontSize=10.2,leading=13.5,textColor=HexColor('#1E293B')));S.add(ParagraphStyle(name='CellX',parent=S['BodyText'],fontSize=9.1,leading=11.5,textColor=HexColor('#1E293B'))) story=[] cover=Table([[Paragraph('PRACTICAL<br/>ACTIVE & PASSIVE<br/>VOICE',S['TitleX'])],[Paragraph('A colourful handbook of natural, real-life speaking replies',S['SubX'])]],colWidths=[17.5*cm],rowHeights=[6.5*cm,1.8*cm]);cover.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#0F766E')),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('TOPPADDING',(0,0),(-1,-1),16),('BOTTOMPADDING',(0,0),(-1,-1),16)]));story.extend([Spacer(1,4.2*cm),cover,Spacer(1,.8*cm)]) box=Table([[Paragraph('<b>Speaking rule:</b> Every model in this handbook is a complete reply. Each answer starts with useful information, not with a question word. Use the lines in everyday conversations, meetings, schools, and workplaces.',S['BodyX'])]],colWidths=[17.5*cm]);box.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('BOX',(0,0),(-1,-1),.8,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),14),('RIGHTPADDING',(0,0),(-1,-1),14),('TOPPADDING',(0,0),(-1,-1),12),('BOTTOMPADDING',(0,0),(-1,-1),12)]));story.extend([box,PageBreak()]) story.extend([Paragraph('Use voice naturally',S['HeadX']),Paragraph('Active voice names the person or group doing the action. Passive voice focuses on the result, action, or thing affected. Both forms are useful in speech when they sound clear and relevant.',S['BodyX']),Spacer(1,.35*cm)]) for text,bg,edge in [('Active: <b>The team completed the work.</b> Direct and clear.','#E0F2FE','#0284C7'),('Passive: <b>The work has been completed.</b> Focuses on the result.','#DCFCE7','#16A34A'),('Natural reply: <b>The update will be sent this afternoon.</b> Starts with information, not a question word.','#FCE7F3','#DB2777')]: t=Table([[Paragraph(text,S['BodyX'])]],colWidths=[17.5*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor(bg)),('LINEBEFORE',(0,0),(0,-1),5,HexColor(edge)),('LEFTPADDING',(0,0),(-1,-1),12),('RIGHTPADDING',(0,0),(-1,-1),12),('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10)]));story.extend([t,Spacer(1,.25*cm)]) story.append(PageBreak()) def section(title,label,data,head,bg): story.append(Paragraph(title,S['HeadX']));story.append(Paragraph('These are complete, practical answers for speaking. No reply below begins with a question word.',S['BodyX']));story.append(Spacer(1,.2*cm)) for start in range(0,len(data),10): rows=[[Paragraph('<b>No.</b>',S['CellX']),Paragraph('<b>Situation</b>',S['CellX']),Paragraph('<b>'+label+'</b>',S['CellX'])]] for j,(context,line) in enumerate(data[start:start+10],start+1): rows.append([Paragraph(str(j),S['CellX']),Paragraph(context,S['CellX']),Paragraph(line,S['CellX'])]) t=Table(rows,colWidths=[.9*cm,3.1*cm,13.5*cm],repeatRows=1);ts=[('BACKGROUND',(0,0),(-1,0),HexColor(head)),('TEXTCOLOR',(0,0),(-1,0),colors.white),('GRID',(0,0),(-1,-1),.35,HexColor('#CBD5E1')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)] for r in range(1,len(rows)): if r%2: ts.append(('BACKGROUND',(0,r),(-1,r),HexColor(bg))) t.setStyle(TableStyle(ts));story.append(t) if start+10<len(data): story.extend([PageBreak(),Paragraph(title+' (continued)',S['HeadX'])]) story.append(PageBreak()) section('Part 1 - Passive voice replies','Passive reply',passive,'#0F766E','#F0FDFA');section('Part 2 - Active voice replies','Active reply',active,'#1D4ED8','#EFF6FF') story.append(Paragraph('Speaking checklist',S['HeadX'])) for x in ['Start with the main information.','Use active voice when the doer matters.','Use passive voice when the result matters more.','Leave out “by someone” if it adds no useful information.','Add a time phrase to make the answer more helpful.']: story.append(Paragraph('• '+x,S['BodyX'])) doc=SimpleDocTemplate(out,pagesize=A4,leftMargin=1.5*cm,rightMargin=1.5*cm,topMargin=1.35*cm,bottomMargin=1.5*cm,title='Practical Active and Passive Voice Conversation Handbook');doc.build(story,canvasmaker=Footer) r=PdfReader(out);print(f'CREATED={out}\nPAGES={len(r.pages)}\nSIZE={os.path.getsize(out)}\nTEXT={r.pages[0].extract_text()[:100]}') PY
Practical Active Passive Conversation Handbook
PDF Document · PDF
make a colorful handbook pdf.Work on my command any answer should not start with question words please just write real life practical conversation answers for speaking to the questions using active voice to passive voice and vice versa passive voice to active voice.. Please include examples from the information mentioned in attached photo,you must mention examples from each cases and tenses given in photo.peepare a colorful handbook pdf
~/attachments/845379bc-97d6-4325-94da-838a1503e8a1
python -c "from pypdf import PdfReader; p='/tmp/workspace/attachments/845379bc-97d6-4325-94da-838a1503e8a1/DOC-20260908-WA0034 (1).pdf'; r=PdfReader(p); print('PAGES',len(r.pages)); [print('---PAGE',i+1,'---\\n'+(x.extract_text() or '')) for i,x in enumerate(r.pages)]"
python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib.colors import HexColor, white from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, Image from reportlab.lib.units import cm from reportlab.pdfgen import canvas from pypdf import PdfReader import os base='/tmp/workspace/voice-conversation-handbook'; out=base+'/output/Complete_Practical_Active_Passive_Speaking_Handbook.pdf'; photo='/tmp/workspace/attachments/845379bc-97d6-4325-94da-838a1503e8a1/1000296313.jpg' os.makedirs(base+'/output',exist_ok=True) # Exact tense cases shown in the supplied image, with image example and fresh natural speaking model. tenses=[ ('Present simple','am / is / are + V3','S + base verb / verb-s','Routine, rule, or regular process','The final design is approved each year.','The board approves the final design each year.','The payment is processed every Friday.','Our accounts team processes the payment every Friday.'), ('Past simple','was / were + V3','S + V2','Completed past decision or event','The proposal was rejected.','The committee rejected the proposal.','Your parcel was delivered this morning.','The courier delivered your parcel this morning.'), ('Present continuous','am / is / are being + V3','S + am / is / are + V-ing','Action in progress now','New homes are being built.','Developers are building new homes.','The menu is being updated right now.','The chef is updating the menu right now.'), ('Past continuous','was / were being + V3','S + was / were + V-ing','Action in progress at a past time','The road was being repaired.','Workers were repairing the road.','The presentation was being prepared when you called.','The design team was preparing the presentation when you called.'), ('Present perfect','has / have been + V3','S + has / have + V3','Completed action relevant now','The first phase has been completed.','The team has completed the first phase.','Your appointment has been confirmed.','The receptionist has confirmed your appointment.'), ('Past perfect','had been + V3','S + had + V3','Earlier completed past action','The old site had been cleared.','Workers had cleared the old site.','The room had been cleaned before the guests arrived.','The staff had cleaned the room before the guests arrived.'), ('Future simple','will be + V3','S + will + base verb','Future plan or prediction','The findings will be published.','The team will publish the findings.','The updated timetable will be sent this evening.','The coordinator will send the updated timetable this evening.'), ('Future perfect','will have been + V3','S + will have + V3','Result completed by a deadline','The stadium will have been completed by July 2030.','Builders will have completed the stadium by July 2030.','The repairs will have been completed by Monday.','The maintenance team will have completed the repairs by Monday.'), ('Modal passive','modal + be + V3','S + modal + base verb','Possibility, advice, necessity, etc.','The plan may be revised.','The board may revise the plan.','The form should be submitted today.','You should submit the form today.'), ('Modal perfect passive','modal + have been + V3','S + modal + have + V3','Comment on an earlier action','The signs should have been installed.','Workers should have installed the signs.','The email could have been sent yesterday.','The assistant could have sent the email yesterday.')] # question prompts from PDF, rewritten as natural answer statements which do not start with question words active_to_passive=[ ('Who will chair the negotiation tomorrow?','The negotiation will be chaired by the appointed moderator tomorrow.'),('Why did the board postpone the vote?','The vote was postponed by the board because more information was needed.'),('How are the researchers verifying the results?','The results are being verified by the researchers now.'),('Which department has prepared the briefing note?','The briefing note has been prepared by the communications department.'),('When will the team publish the final report?','The final report will be published by the team on Friday.'),('Have the engineers resolved the security flaw?','The security flaw has been resolved by the engineers.'),('Who had approved the budget before the merger?','The budget had been approved before the merger.'),('Why are they revising the policy now?','The policy is being revised now to reflect the new rules.'),('Could the panel reconsider the recommendation?','The recommendation could be reconsidered by the panel next week.'),('Who should notify the applicants about the delay?','The applicants should be notified about the delay today.'),('Did the auditors identify any irregularities?','A few irregularities were identified by the auditors.'),('How might the media interpret the statement?','The statement might be interpreted differently by the media.'),('Why have they excluded several witnesses?','Several witnesses have been excluded from the review.'),('Will the agency release the findings next week?','The findings will be released by the agency next week.'),('Who is monitoring the implementation of the agreement?','The implementation of the agreement is being monitored closely.'),('Did the editor remove the disputed paragraph?','The disputed paragraph was removed by the editor.'),('Why had the committee rejected the earlier proposal?','The earlier proposal had been rejected by the committee.'),('Can the company guarantee the delivery date?','The delivery date can be guaranteed by the company.'),('Who gave the delegates the updated schedule?','The delegates were given the updated schedule this morning.'),('Have they offered the candidate a revised contract?','The candidate has been offered a revised contract.'),('Why are they asking the public to comment?','The public is being asked to comment before the deadline.'),('Who dealt with the complaint last month?','The complaint was dealt with last month.'),('Should we treat this evidence with caution?','This evidence should be treated with caution.'),('Did anyone inform you about the change?','You were informed about the change by email.'),('Who is expected to deliver the keynote address?','The keynote address is expected to be delivered by the invited speaker.'),('Why do people believe that the minister will resign?','It is widely believed that the minister will resign.'),('Could they have prevented the error?','The error could have been prevented with an extra check.'),('When will they have completed the investigation?','The investigation will have been completed by the end of the month.'),('Who must sign the agreement before midnight?','The agreement must be signed before midnight.'),('Why did they turn down the proposal?','The proposal was turned down after the discussion.'),('Who is going to announce the winners?','The winners are going to be announced tonight.'),('Have the technicians installed the new software?','The new software has been installed by the technicians.'),('Why were they interviewing the witnesses?','The witnesses were being interviewed by the team.'),('Who could have leaked the confidential memo?','The confidential memo could have been leaked by someone.'),('How will they evaluate the long-term impact?','The long-term impact will be evaluated after six months.')] passive_to_active=[ ('When will the contract be signed by the supplier?','The supplier will sign the contract tomorrow.'),('Why was the launch postponed by the organisers?','The organisers postponed the launch because the venue was unavailable.'),('How is the evidence being examined by the investigators?','The investigators are examining the evidence now.'),('Which report has been submitted by the legal team?','The legal team has submitted the compliance report.'),('Who was invited to the closed meeting?','The organisers invited the department heads to the closed meeting.'),('Has the proposal been accepted by the board?','The board has accepted the proposal.'),('Why had the data been deleted before the audit?','Someone had deleted the data before the audit.'),('Can the deadline be extended by the client?','The client can extend the deadline.'),('Why are the applicants being asked for further documents?','The recruitment team is asking the applicants for further documents.'),('Could the decision be challenged in court?','A legal team could challenge the decision in court.'),('Were any errors detected by the reviewers?','The reviewers detected a few errors.'),('How might the findings be used by policy makers?','Policy makers might use the findings to improve the service.'),('Why have several claims been withdrawn?','The claimants have withdrawn several claims.'),('Will the public be consulted before the change?','The council will consult the public before the change.'),('Is the project being funded by an external donor?','An external donor is funding the project.'),('Was the disputed section removed by the editor?','The editor removed the disputed section.'),('Why had the proposal been rejected by the committee?','The committee had rejected the proposal after the review.'),('Can the report be completed by Friday?','The team can complete the report by Friday.'),('Were the delegates given a revised timetable?','The organisers gave the delegates a revised timetable.'),('Has the candidate been offered a revised contract?','The company has offered the candidate a revised contract.'),('Why is the public being asked to comment?','The organisers are asking the public to comment before the deadline.'),('Was the complaint dealt with promptly?','Customer support dealt with the complaint promptly.'),('Should the evidence be treated with caution?','We should treat the evidence with caution.'),('Were you informed about the change?','We informed you about the change by email.'),('Is the keynote address expected to be delivered by the invited speaker?','The invited speaker is expected to deliver the keynote address.'),('Why is it believed that the minister will resign?','Many people believe that the minister will resign.'),('Could the error have been prevented?','The team could have prevented the error with an extra check.'),('When will the investigation have been completed?','The team will have completed the investigation by the end of the month.'),('Must the agreement be signed before midnight?','The parties must sign the agreement before midnight.'),('Why was the proposal turned down?','The committee turned down the proposal after the discussion.'),('Are the winners going to be announced tonight?','The host is going to announce the winners tonight.'),('Has the new software been installed by the technicians?','The technicians have installed the new software.'),('Why were the witnesses being interviewed?','The team was interviewing the witnesses.'),('Could the confidential memo have been leaked?','Someone could have leaked the confidential memo.'),('How will the long-term impact be evaluated?','The team will evaluate the long-term impact after six months.')] class Numbered(canvas.Canvas): def __init__(self,*a,**k): super().__init__(*a,**k);self.saved=[] def showPage(self): self.saved.append(dict(self.__dict__));self._startPage() def save(self): total=len(self.saved) for st in self.saved: self.__dict__.update(st);self.setStrokeColor(HexColor('#14B8A6'));self.setLineWidth(1);self.line(1.45*cm,1.1*cm,19.55*cm,1.1*cm);self.setFillColor(HexColor('#0F766E'));self.setFont('Helvetica-Bold',8);self.drawString(1.5*cm,.72*cm,'Practical Active & Passive Voice | Speaking Handbook');self.setFillColor(HexColor('#64748B'));self.setFont('Helvetica',8);self.drawRightString(19.5*cm,.72*cm,f'{self._pageNumber} / {total}');super().showPage() super().save() S=getSampleStyleSheet();S.add(ParagraphStyle(name='Cover',parent=S['Title'],fontName='Helvetica-Bold',fontSize=29,leading=34,textColor=white,alignment=TA_CENTER));S.add(ParagraphStyle(name='CoverSub',parent=S['Normal'],fontSize=12.5,leading=17,textColor=HexColor('#D1FAE5'),alignment=TA_CENTER));S.add(ParagraphStyle(name='H',parent=S['Heading1'],fontName='Helvetica-Bold',fontSize=19,leading=23,textColor=HexColor('#0F766E'),spaceAfter=7));S.add(ParagraphStyle(name='B',parent=S['BodyText'],fontSize=10,leading=13.2,textColor=HexColor('#1E293B')));S.add(ParagraphStyle(name='C',parent=S['BodyText'],fontSize=8.65,leading=10.9,textColor=HexColor('#1E293B')));S.add(ParagraphStyle(name='T',parent=S['BodyText'],fontSize=9.5,leading=12.2,textColor=HexColor('#1E293B'))) story=[] cover=Table([[Paragraph('ACTIVE & PASSIVE<br/>VOICE FOR SPEAKING',S['Cover'])],[Paragraph('Natural real-life replies for every tense and case in your supplied table',S['CoverSub'])]],colWidths=[17.6*cm],rowHeights=[6.7*cm,1.6*cm]);cover.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#0F766E')),('VALIGN',(0,0),(-1,-1),'MIDDLE')])) story.extend([Spacer(1,2.8*cm),cover,Spacer(1,.7*cm)]) rule=Table([[Paragraph('<b>Your rule followed throughout:</b> Every model answer is a complete, useful reply for real conversation. The answers do not start with question words such as <i>what, why, when, where, who,</i> or <i>how</i>.',S['B'])]],colWidths=[17.6*cm]);rule.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('BOX',(0,0),(-1,-1),1,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),13),('RIGHTPADDING',(0,0),(-1,-1),13),('TOPPADDING',(0,0),(-1,-1),11),('BOTTOMPADDING',(0,0),(-1,-1),11)]));story.extend([rule,PageBreak()]) # Source photo & tense master map story.extend([Paragraph('Your supplied tense chart',S['H']),Paragraph('The handbook covers every tense and case shown in the photo. The photograph is included below as the source reference.',S['B']),Spacer(1,.2*cm)]) img=Image(photo,width=17.4*cm,height=10.3*cm);story.extend([img,Spacer(1,.2*cm),Paragraph('<b>V3</b> means past participle, for example: <i>approved, rejected, built, completed.</i>',S['B']),PageBreak()]) # ten cases for i,(name,pform,aform,use,photoP,photoA,prP,prA) in enumerate(tenses): story.append(Paragraph(f'{i+1}. {name}',S['H'])) data=[[Paragraph('<b>Use</b>',S['C']),Paragraph(use,S['T'])],[Paragraph('<b>Passive pattern</b>',S['C']),Paragraph(pform,S['T'])],[Paragraph('<b>Active pattern</b>',S['C']),Paragraph(aform,S['T'])],[Paragraph('<b>Photo example</b>',S['C']),Paragraph('<b>Passive:</b> '+photoP+'<br/><b>Active:</b> '+photoA,S['T'])],[Paragraph('<b>Speaking model</b>',S['C']),Paragraph('<b>Passive reply:</b> '+prP+'<br/><b>Active reply:</b> '+prA,S['T'])]] t=Table(data,colWidths=[4.0*cm,13.6*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(0,-1),HexColor('#CCFBF1' if i%2==0 else '#DBEAFE')),('BACKGROUND',(1,0),(1,-1),HexColor('#F8FAFC')),('GRID',(0,0),(-1,-1),.45,HexColor('#94A3B8')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),9),('RIGHTPADDING',(0,0),(-1,-1),9),('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7)]));story.append(t) if i<len(tenses)-1: story.append(PageBreak()) story.append(PageBreak()) def practice(title, subtitle, records, header, shade): story.extend([Paragraph(title,S['H']),Paragraph(subtitle,S['B']),Spacer(1,.18*cm)]) for start in range(0,len(records),9): rows=[[Paragraph('<b>No.</b>',S['C']),Paragraph('<b>Original practice question</b>',S['C']),Paragraph('<b>Speak this instead</b>',S['C'])]] for n,(q,ans) in enumerate(records[start:start+9],start+1): rows.append([Paragraph(str(n),S['C']),Paragraph(q,S['C']),Paragraph(ans,S['C'])]) t=Table(rows,colWidths=[.85*cm,7.25*cm,9.5*cm],repeatRows=1);sty=[('BACKGROUND',(0,0),(-1,0),HexColor(header)),('TEXTCOLOR',(0,0),(-1,0),white),('GRID',(0,0),(-1,-1),.35,HexColor('#CBD5E1')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)] for r in range(1,len(rows)): if r%2:sty.append(('BACKGROUND',(0,r),(-1,r),HexColor(shade))) t.setStyle(TableStyle(sty));story.append(t) if start+9<len(records):story.extend([PageBreak(),Paragraph(title+' (continued)',S['H'])]) story.append(PageBreak()) practice('Practice A: Active to passive','Each original prompt is from the supplied PDF. The right-hand column gives a natural reply in passive voice, without beginning with a question word.',active_to_passive,'#0F766E','#F0FDFA') practice('Practice B: Passive to active','Each original prompt is from the supplied PDF. The right-hand column gives a natural reply in active voice, without beginning with a question word.',passive_to_active,'#1D4ED8','#EFF6FF') story.extend([Paragraph('Fast speaking guide',S['H']),Paragraph('<b>Use active voice</b> when naming the doer is helpful: “The technician installed the software.”<br/><br/><b>Use passive voice</b> when the result is more important or the doer is unknown: “The software has been installed.”<br/><br/><b>Keep the answer practical.</b> Add a useful time, reason, or next step: “The report will be sent this afternoon.”',S['B'])]) doc=SimpleDocTemplate(out,pagesize=A4,leftMargin=1.45*cm,rightMargin=1.45*cm,topMargin=1.3*cm,bottomMargin=1.5*cm,title='Complete Practical Active Passive Speaking Handbook') doc.build(story,canvasmaker=Numbered) r=PdfReader(out);text=''.join((p.extract_text() or '') for p in r.pages);assert 'Present simple' in text and 'Modal perfect passive' in text and 'The negotiation will be chaired' in text and 'The supplier will sign the contract' in text print('CREATED',out,'PAGES',len(r.pages),'SIZE',os.path.getsize(out)) PY
python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/voice-conversation-handbook/output/Complete_Practical_Active_Passive_Speaking_Handbook.pdf' r=PdfReader(p) print('pages',len(r.pages)) for n in [0,1,2,12,20]: t=r.pages[n].extract_text() or '' print('\nPAGE',n+1,'chars',len(t),'\n',t[:500].replace('\n',' | ')) print('metadata',r.metadata) PY
Complete Practical Active Passive Speaking Handbook
PDF Document · PDF
I told you to prepare list of conversation questions along with answers for intensive speaking practice using all the information which I have attached.
~/
python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib.colors import HexColor, white from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.units import cm from reportlab.pdfgen import canvas from pypdf import PdfReader import os, re root='/tmp/workspace/voice-conversation-handbook'; out=root+'/output/Intensive_Active_Passive_Conversation_QA_Handbook.pdf'; os.makedirs(root+'/output',exist_ok=True) # 10 cases exactly from the supplied image. 4 conversational Q&A drills per case. sets=[ ('1. Present Simple','Active: S + base verb / verb-s','Passive: am / is / are + V3','Routine, rule, or regular process','#0F766E','#F0FDFA',[ ('Active question','Who approves the final design each year?','Passive speaking answer','The final design is approved by the board each year.'), ('Passive question','Is the payment processed every Friday?','Active speaking answer','Our accounts team processes the payment every Friday.'), ('Active question','Which team sends the weekly schedule?','Passive speaking answer','The weekly schedule is sent by the office team every Monday.'), ('Passive question','Are visitor badges checked at the entrance?','Active speaking answer','Security staff check visitor badges at the entrance.')]), ('2. Past Simple','Active: S + V2','Passive: was / were + V3','Completed past decision or event','#1D4ED8','#EFF6FF',[ ('Active question','Who rejected the proposal yesterday?','Passive speaking answer','The proposal was rejected by the committee yesterday.'), ('Passive question','Was your parcel delivered this morning?','Active speaking answer','The courier delivered my parcel this morning.'), ('Active question','Why did the manager cancel the meeting?','Passive speaking answer','The meeting was cancelled because the manager was unwell.'), ('Passive question','Were the guests welcomed at the door?','Active speaking answer','The host welcomed the guests at the door.')]), ('3. Present Continuous','Active: S + am / is / are + V-ing','Passive: am / is / are being + V3','Action in progress now','#7C3AED','#F5F3FF',[ ('Active question','Who is building the new homes?','Passive speaking answer','New homes are being built by the developers.'), ('Passive question','Is the menu being updated right now?','Active speaking answer','The chef is updating the menu right now.'), ('Active question','Why are the technicians checking the system?','Passive speaking answer','The system is being checked because it is running slowly.'), ('Passive question','Are the customers being helped at the counter?','Active speaking answer','The staff are helping the customers at the counter.')]), ('4. Past Continuous','Active: S + was / were + V-ing','Passive: was / were being + V3','Action in progress at a past time','#C2410C','#FFF7ED',[ ('Active question','Who was repairing the road last week?','Passive speaking answer','The road was being repaired by the workers last week.'), ('Passive question','Was the presentation being prepared when I called?','Active speaking answer','The design team was preparing the presentation when you called.'), ('Active question','Why were they interviewing the witnesses?','Passive speaking answer','The witnesses were being interviewed for the investigation.'), ('Passive question','Were the rooms being cleaned at noon?','Active speaking answer','The housekeeping staff were cleaning the rooms at noon.')]), ('5. Present Perfect','Active: S + has / have + V3','Passive: has / have been + V3','Completed action relevant now','#BE185D','#FDF2F8',[ ('Active question','Who has completed the first phase?','Passive speaking answer','The first phase has been completed by the project team.'), ('Passive question','Has your appointment been confirmed?','Active speaking answer','The receptionist has confirmed my appointment.'), ('Active question','Have the technicians installed the new software?','Passive speaking answer','The new software has been installed by the technicians.'), ('Passive question','Have the invitations been sent already?','Active speaking answer','The events team has sent the invitations already.')]), ('6. Past Perfect','Active: S + had + V3','Passive: had been + V3','Earlier completed past action','#334155','#F1F5F9',[ ('Active question','Who had cleared the old site before the work began?','Passive speaking answer','The old site had been cleared by the workers before the work began.'), ('Passive question','Had the room been cleaned before the guests arrived?','Active speaking answer','The staff had cleaned the room before the guests arrived.'), ('Active question','Why had the committee rejected the earlier proposal?','Passive speaking answer','The earlier proposal had been rejected because it was too expensive.'), ('Passive question','Had the documents been checked before the meeting?','Active speaking answer','The legal team had checked the documents before the meeting.')]), ('7. Future Simple','Active: S + will + base verb','Passive: will be + V3','Future plan or prediction','#0369A1','#F0F9FF',[ ('Active question','Who will publish the findings?','Passive speaking answer','The findings will be published by the research team.'), ('Passive question','Will the updated timetable be sent this evening?','Active speaking answer','The coordinator will send the updated timetable this evening.'), ('Active question','When will the team release the final report?','Passive speaking answer','The final report will be released on Friday.'), ('Passive question','Will the room be prepared before the workshop?','Active speaking answer','The events team will prepare the room before the workshop.')]), ('8. Future Perfect','Active: S + will have + V3','Passive: will have been + V3','Result completed by a deadline','#A16207','#FEFCE8',[ ('Active question','Who will have completed the stadium by July 2030?','Passive speaking answer','The stadium will have been completed by the builders by July 2030.'), ('Passive question','Will the repairs have been completed by Monday?','Active speaking answer','The maintenance team will have completed the repairs by Monday.'), ('Active question','Will the team have finished the investigation by month-end?','Passive speaking answer','The investigation will have been completed by the end of the month.'), ('Passive question','Will all orders have been packed by noon?','Active speaking answer','The warehouse team will have packed all orders by noon.')]), ('9. Modal Passive','Active: S + modal + base verb','Passive: modal + be + V3','Possibility, advice, necessity, etc.','#B45309','#FFFBEB',[ ('Active question','Can the company guarantee the delivery date?','Passive speaking answer','The delivery date can be guaranteed by the company.'), ('Passive question','Should the form be submitted today?','Active speaking answer','You should submit the form today.'), ('Active question','May the board revise the plan?','Passive speaking answer','The plan may be revised by the board.'), ('Passive question','Must the agreement be signed before midnight?','Active speaking answer','The parties must sign the agreement before midnight.')]), ('10. Modal Perfect Passive','Active: S + modal + have + V3','Passive: modal + have been + V3','Comment on an earlier action','#9F1239','#FFF1F2',[ ('Active question','Who should have installed the signs?','Passive speaking answer','The signs should have been installed by the workers.'), ('Passive question','Could the email have been sent yesterday?','Active speaking answer','The assistant could have sent the email yesterday.'), ('Active question','Could the team have prevented the error?','Passive speaking answer','The error could have been prevented with an extra check.'), ('Passive question','Should the documents have been checked earlier?','Active speaking answer','The legal team should have checked the documents earlier.')])] class Foot(canvas.Canvas): def __init__(self,*a,**k):super().__init__(*a,**k);self.pages=[] def showPage(self):self.pages.append(dict(self.__dict__));self._startPage() def save(self): n=len(self.pages) for s in self.pages: self.__dict__.update(s);self.setStrokeColor(HexColor('#14B8A6'));self.line(1.35*cm,1.15*cm,19.65*cm,1.15*cm);self.setFillColor(HexColor('#0F766E'));self.setFont('Helvetica-Bold',8);self.drawString(1.4*cm,.78*cm,'Intensive Active & Passive Voice Conversation Practice');self.setFillColor(HexColor('#64748B'));self.setFont('Helvetica',8);self.drawRightString(19.6*cm,.78*cm,f'Page {self._pageNumber} of {n}');super().showPage() super().save() S=getSampleStyleSheet();S.add(ParagraphStyle(name='Cover',parent=S['Title'],fontName='Helvetica-Bold',fontSize=29,leading=34,alignment=TA_CENTER,textColor=white));S.add(ParagraphStyle(name='Sub',parent=S['Normal'],fontSize=12.3,leading=16,alignment=TA_CENTER,textColor=HexColor('#CCFBF1')));S.add(ParagraphStyle(name='H',parent=S['Heading1'],fontName='Helvetica-Bold',fontSize=18.5,leading=22,textColor=HexColor('#0F766E'),spaceAfter=7));S.add(ParagraphStyle(name='B',parent=S['BodyText'],fontSize=10,leading=13.5,textColor=HexColor('#1E293B')));S.add(ParagraphStyle(name='Cell',parent=S['BodyText'],fontSize=9.25,leading=12,textColor=HexColor('#172554'))) story=[] cover=Table([[Paragraph('INTENSIVE<br/>CONVERSATION PRACTICE',S['Cover'])],[Paragraph('Active voice ↔ Passive voice<br/>Questions and natural spoken answers for all 10 tense cases',S['Sub'])]],colWidths=[17.7*cm],rowHeights=[6.6*cm,1.9*cm]);cover.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#0F766E')),('VALIGN',(0,0),(-1,-1),'MIDDLE')])) story.extend([Spacer(1,3*cm),cover,Spacer(1,.55*cm)]) r=Table([[Paragraph('<b>How to practise:</b> Read the question aloud. Then give the supplied answer in the target voice. Each answer is a real-life, complete reply and does not begin with a question word.',S['B'])]],colWidths=[17.7*cm]);r.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('BOX',(0,0),(-1,-1),.8,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),13),('RIGHTPADDING',(0,0),(-1,-1),13),('TOPPADDING',(0,0),(-1,-1),10),('BOTTOMPADDING',(0,0),(-1,-1),10)]));story.extend([r,PageBreak()]) story.extend([Paragraph('Practice instructions',S['H']),Paragraph('The questions are deliberately conversational. The answer models show how the same information is expressed in the opposite voice. Every tense, pattern, and use note comes from the attached tense table: present simple, past simple, present continuous, past continuous, present perfect, past perfect, future simple, future perfect, modal passive, and modal perfect passive.',S['B']),Spacer(1,.25*cm)]) info=[['<b>Direction 1</b>','Read an active-voice question and answer it in passive voice.'],['<b>Direction 2</b>','Read a passive-voice question and answer it in active voice.'],['<b>Speaking tip</b>','Give the complete answer, then repeat it once without reading.']] t=Table([[Paragraph(a,S['B']),Paragraph(b,S['B'])] for a,b in info],colWidths=[4*cm,13.7*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(0,-1),HexColor('#CCFBF1')),('BACKGROUND',(1,0),(1,-1),HexColor('#F8FAFC')),('GRID',(0,0),(-1,-1),.4,HexColor('#99F6E4')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),9),('RIGHTPADDING',(0,0),(-1,-1),9),('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8)]));story.extend([t,PageBreak()]) for si,(title,act,passv,use,head,shade,drills) in enumerate(sets): story.append(Paragraph(title,S['H'])) meta=Table([[Paragraph('<b>Use</b>',S['Cell']),Paragraph(use,S['Cell'])],[Paragraph('<b>Active form</b>',S['Cell']),Paragraph(act,S['Cell'])],[Paragraph('<b>Passive form</b>',S['Cell']),Paragraph(passv,S['Cell'])]],colWidths=[4*cm,13.7*cm]);meta.setStyle(TableStyle([('BACKGROUND',(0,0),(0,-1),HexColor(shade)),('BACKGROUND',(1,0),(1,-1),HexColor('#FFFFFF')),('GRID',(0,0),(-1,-1),.35,HexColor('#CBD5E1')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6)]));story.extend([meta,Spacer(1,.25*cm)]) rows=[[Paragraph('<b>Drill</b>',S['Cell']),Paragraph('<b>Conversation question</b>',S['Cell']),Paragraph('<b>Natural speaking answer</b>',S['Cell'])]] for i,(qtag,q,atag,a) in enumerate(drills,1):rows.append([Paragraph(f'{i}. {qtag}<br/><br/>{atag}',S['Cell']),Paragraph(q,S['Cell']),Paragraph(a,S['Cell'])]) tab=Table(rows,colWidths=[3.55*cm,7.15*cm,7*cm],repeatRows=1);style=[('BACKGROUND',(0,0),(-1,0),HexColor(head)),('TEXTCOLOR',(0,0),(-1,0),white),('GRID',(0,0),(-1,-1),.35,HexColor('#CBD5E1')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7)] for rr in range(1,5): if rr%2:style.append(('BACKGROUND',(0,rr),(-1,rr),HexColor(shade))) tab.setStyle(TableStyle(style));story.append(tab) story.append(Spacer(1,.35*cm));tip=Table([[Paragraph('<b>Repeat challenge:</b> Cover the right column and answer each question aloud in the correct voice. Then compare your reply with the model.',S['B'])]],colWidths=[17.7*cm]);tip.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('LINEBEFORE',(0,0),(0,-1),5,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),10),('RIGHTPADDING',(0,0),(-1,-1),10),('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7)]));story.append(tip) if si<len(sets)-1:story.append(PageBreak()) story.append(PageBreak());story.extend([Paragraph('Final speaking challenge',S['H']),Paragraph('Ask a partner to read the questions in any order. Give the answer without looking at the handbook. Keep the meaning, change the voice, and include the useful details such as time, reason, or person responsible.',S['B']),Spacer(1,.25*cm),Paragraph('<b>Active answer example:</b> “The technician installed the software this morning.”<br/><br/><b>Passive answer example:</b> “The software was installed this morning.”',S['B'])]) doc=SimpleDocTemplate(out,pagesize=A4,leftMargin=1.4*cm,rightMargin=1.4*cm,topMargin=1.35*cm,bottomMargin=1.55*cm,title='Intensive Active Passive Conversation Q&A Handbook') doc.build(story,canvasmaker=Foot) reader=PdfReader(out);tx=''.join(p.extract_text() or '' for p in reader.pages) assert len(reader.pages)>=12 and 'Who approves the final design each year?' in tx and 'Could the email have been sent yesterday?' in tx and 'The email could have been sent yesterday.' in tx print('CREATED',out,'PAGES',len(reader.pages),'SIZE',os.path.getsize(out)) PY
python - <<'PY' from pypdf import PdfReader import os p='/tmp/workspace/voice-conversation-handbook/output/Intensive_Active_Passive_Conversation_QA_Handbook.pdf' print(os.path.exists(p), os.path.getsize(p) if os.path.exists(p) else None) if os.path.exists(p): r=PdfReader(p);t=''.join(x.extract_text() or '' for x in r.pages); print('pages',len(r.pages));print(t[:1000]); print('has first', 'Who approves the final design each year?' in t);print('last',t[-1200:]) PY
Intensive Active Passive Conversation QA Handbook
PDF Document · PDF
Now prepare separately 15 another conversation questions without answer for my student for homework and separately prepare answer key
Create a colorful PDF of the 15 homework questions
~/
mkdir -p "/tmp/workspace/voice-conversation-handbook/homework-pdf" && python - <<'PY' from reportlab.lib.pagesizes import A4 from reportlab.lib.colors import HexColor, white from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak from reportlab.lib.units import cm from reportlab.pdfgen import canvas from pypdf import PdfReader import os out='/tmp/workspace/voice-conversation-handbook/homework-pdf/Active_Passive_Voice_Homework_Questions.pdf' questions=[ ('Who checks the visitor badges at the entrance every day?','Answer in passive voice'), ('Was the customer’s complaint handled promptly yesterday?','Answer in active voice'), ('Who is preparing the meeting room right now?','Answer in passive voice'), ('Were the invitations being printed when the printer stopped?','Answer in active voice'), ('Has the manager approved the leave request?','Answer in passive voice'), ('Had the documents been reviewed before the interview started?','Answer in active voice'), ('Who will send the joining instructions to the new employees?','Answer in passive voice'), ('Will the repairs have been completed by next Friday?','Answer in active voice'), ('Can the delivery date be changed by the supplier?','Answer in active voice'), ('Who could have prevented the booking error?','Answer in passive voice'), ('Why did the teacher cancel the extra class?','Answer in passive voice'), ('Are the applicants being contacted by the recruitment team?','Answer in active voice'), ('Who has uploaded the updated timetable?','Answer in passive voice'), ('Must the equipment be returned before the office closes?','Answer in active voice'), ('Why had the old files been removed before the audit?','Answer in active voice'), ] class Footer(canvas.Canvas): def __init__(self,*a,**k): super().__init__(*a,**k); self.states=[] def showPage(self): self.states.append(dict(self.__dict__)); self._startPage() def save(self): for s in self.states: self.__dict__.update(s) self.setStrokeColor(HexColor('#14B8A6'));self.setLineWidth(.7);self.line(1.35*cm,1.05*cm,19.65*cm,1.05*cm) self.setFillColor(HexColor('#0F766E'));self.setFont('Helvetica-Bold',8);self.drawString(1.4*cm,.68*cm,'Active & Passive Voice | Homework Practice') self.setFillColor(HexColor('#64748B'));self.setFont('Helvetica',8);self.drawRightString(19.6*cm,.68*cm,f'Page {self._pageNumber} of {len(self.states)}') super().showPage() super().save() S=getSampleStyleSheet() S.add(ParagraphStyle(name='Cover',parent=S['Title'],fontName='Helvetica-Bold',fontSize=28,leading=33,textColor=white,alignment=TA_CENTER)) S.add(ParagraphStyle(name='Sub',parent=S['Normal'],fontName='Helvetica',fontSize=13,leading=17,textColor=HexColor('#CCFBF1'),alignment=TA_CENTER)) S.add(ParagraphStyle(name='H',parent=S['Heading1'],fontName='Helvetica-Bold',fontSize=20,leading=24,textColor=HexColor('#0F766E'),spaceAfter=9)) S.add(ParagraphStyle(name='Body',parent=S['BodyText'],fontName='Helvetica',fontSize=10.5,leading=14,textColor=HexColor('#1E293B'))) S.add(ParagraphStyle(name='Q',parent=S['BodyText'],fontName='Helvetica',fontSize=10.2,leading=13.5,textColor=HexColor('#172554'))) S.add(ParagraphStyle(name='Tag',parent=S['BodyText'],fontName='Helvetica-Bold',fontSize=8.6,leading=11,textColor=HexColor('#FFFFFF'),alignment=TA_CENTER)) story=[] cover=Table([[Paragraph('ACTIVE & PASSIVE<br/>VOICE HOMEWORK',S['Cover'])],[Paragraph('15 conversation questions for independent speaking practice',S['Sub'])]],colWidths=[17.7*cm],rowHeights=[6.5*cm,1.8*cm]) cover.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#0F766E')),('VALIGN',(0,0),(-1,-1),'MIDDLE')])) story.extend([Spacer(1,3.0*cm),cover,Spacer(1,.6*cm)]) info=Table([[Paragraph('<b>Instructions:</b> Read each question aloud. Answer it in the opposite voice shown in the coloured box. Give a complete, natural reply. Write your answer in the space below each question.',S['Body'])]],colWidths=[17.7*cm]) info.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FEF3C7')),('BOX',(0,0),(-1,-1),1,HexColor('#F59E0B')),('LEFTPADDING',(0,0),(-1,-1),13),('RIGHTPADDING',(0,0),(-1,-1),13),('TOPPADDING',(0,0),(-1,-1),11),('BOTTOMPADDING',(0,0),(-1,-1),11)])) story.extend([info,PageBreak()]) story.append(Paragraph('Homework Questions',S['H'])) story.append(Paragraph('Name: ____________________________________________ Date: ____________________',S['Body'])) story.append(Spacer(1,.25*cm)) for start in range(0,15,5): rows=[] for n,(q,task) in enumerate(questions[start:start+5],start+1): color='#1D4ED8' if 'passive' in task.lower() else '#7C3AED' left=Paragraph(f'<b>{n}.</b>',S['Q']) content=Paragraph(q,S['Q']) label=Table([[Paragraph(task,S['Tag'])]],colWidths=[3.4*cm],rowHeights=[.62*cm]);label.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor(color)),('VALIGN',(0,0),(-1,-1),'MIDDLE')])) prompt=Table([[left,content,label]],colWidths=[.65*cm,10.55*cm,4.2*cm]) prompt.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'MIDDLE'),('BACKGROUND',(0,0),(-1,-1),HexColor('#EFF6FF' if n%2 else '#F5F3FF')),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8),('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8)])) answer=Table([[Paragraph('<font color="#64748B"><i>My answer:</i></font> ____________________________________________________________________________________________',S['Q'])],[Paragraph('____________________________________________________________________________________________________',S['Q'])]],colWidths=[17.7*cm]) answer.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#FFFFFF')),('LINEBELOW',(0,0),(-1,-1),.35,HexColor('#CBD5E1')),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)])) rows.extend([prompt,answer,Spacer(1,.2*cm)]) story.extend(rows) if start+5<15: story.append(PageBreak());story.append(Paragraph('Homework Questions (continued)',S['H'])) story.append(PageBreak()) story.append(Paragraph('Speaking Checklist',S['H'])) checks=['I identified the tense before answering.','I changed the sentence into the requested voice.','I kept the meaning the same.','I gave a full, natural answer.','I read each answer aloud at least twice.'] for i,c in enumerate(checks,1): box=Table([[Paragraph(f'<b>□</b> {c}',S['Body'])]],colWidths=[17.7*cm]) box.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),HexColor('#F0FDFA' if i%2 else '#EFF6FF')),('LINEBEFORE',(0,0),(0,-1),4,HexColor('#14B8A6' if i%2 else '#3B82F6')),('LEFTPADDING',(0,0),(-1,-1),11),('TOPPADDING',(0,0),(-1,-1),9),('BOTTOMPADDING',(0,0),(-1,-1),9)])) story.extend([box,Spacer(1,.18*cm)]) story.append(Spacer(1,.5*cm));story.append(Paragraph('<b>Teacher note:</b> This PDF intentionally contains questions only. The answer key is kept separate.',S['Body'])) doc=SimpleDocTemplate(out,pagesize=A4,leftMargin=1.4*cm,rightMargin=1.4*cm,topMargin=1.35*cm,bottomMargin=1.45*cm,title='Active Passive Voice Homework Questions') doc.build(story,canvasmaker=Footer) r=PdfReader(out); text=''.join(p.extract_text() or '' for p in r.pages) assert len(r.pages)==5 and 'Who checks the visitor badges' in text and 'Why had the old files been removed' in text and 'Answer in passive voice' in text print(f'CREATED {out}\nPAGES {len(r.pages)}\nSIZE {os.path.getsize(out)}') PY
python - <<'PY' from pypdf import PdfReader import os p='/tmp/workspace/voice-conversation-handbook/homework-pdf/Active_Passive_Voice_Homework_Questions.pdf' print('exists',os.path.exists(p),'size',os.path.getsize(p) if os.path.exists(p) else 0) if os.path.exists(p): r=PdfReader(p);t=''.join(x.extract_text() or '' for x in r.pages);print('pages',len(r.pages));print('first',t[:500]);print('last',t[-500:]);print('checks',[x in t for x in ['Who checks the visitor badges','Why had the old files been removed','Answer in passive voice']]) PY
Active Passive Voice Homework Questions
PDF Document · PDF