Extract the question and it's 4 option from.the following images and do not show the correct answers
Now make an ppt presentation with dynamic effect and answer on blank slide with correct answer and explanation
~/
official sources Bollywood songs films Dangal 3 Idiots steel iron Jana Gana Mana Mercury vitamin D Pacific Ocean facts
"Vitamin D" AND sunlight
~/
mkdir -p "/tmp/workspace/bollywood-general-quiz/src" "/tmp/workspace/bollywood-general-quiz/output" && printf '%s' 'ready'
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/bollywood-general-quiz/src/create_quiz.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.dml.color import RGBColor from pptx.oxml.xmlchemy import OxmlElement OUT = '/tmp/workspace/bollywood-general-quiz/output/Interactive_Quiz_Questions_and_Answers.pptx' questions = [ ('Which film features the song “Mere Haath Mein”?', ['Rang De Basanti','Taare Zameen Par','Fanaa','Ghajini'], 'C', '“Mere Haath Mein” is featured on the soundtrack of Fanaa (2006).'), ('The song “Badtameez Dil” appears in which film?', ['Tamasha','Yeh Jawaani Hai Deewani','Rockstar','Wake Up Sid'], 'B', '“Badtameez Dil” is part of the Yeh Jawaani Hai Deewani soundtrack.'), ('Which singer is strongly associated with the song “Lag Ja Gale”?', ['Lata Mangeshkar','Geeta Dutt','Asha Bhosle','Shamshad Begum'], 'A', 'The classic song “Lag Ja Gale” is sung by Lata Mangeshkar.'), ('Who directed the Bollywood film Dangal?', ['Nitesh Tiwari','Sanjay Leela Bhansali','Rajkumar Hirani','Kabir Khan'], 'A', 'Dangal was written and directed by Nitesh Tiwari.'), ('Which movie features the characters Rancho, Farhan, and Raju?', ['Chhichhore','Rang De Basanti','3 Idiots','Dil Chahta Hai'], 'C', '3 Idiots follows the friendship of Rancho, Farhan, and Raju during their college years.'), ('Which metal is the main component of steel?', ['Zinc','Copper','Aluminium','Iron'], 'D', 'Steel is an iron-based alloy, usually containing carbon and sometimes other elements.'), ('Who wrote the Indian national anthem, Jana Gana Mana?', ['Rabindranath Tagore','Sarojini Naidu','Subramania Bharati','Bankim Chandra Chattopadhyay'], 'A', 'Jana Gana Mana was written by Rabindranath Tagore.'), ('Which planet has the shortest year in our Solar System?', ['Venus','Mercury','Earth','Mars'], 'B', 'Mercury completes one orbit around the Sun in about 88 Earth days.'), ('Which vitamin is primarily produced in the skin when it is exposed to sunlight?', ['Vitamin D','Vitamin K','Vitamin A','Vitamin C'], 'A', 'UVB exposure enables the skin to synthesize vitamin D.'), ('Which is the largest ocean on Earth?', ['Pacific Ocean','Arctic Ocean','Atlantic Ocean','Indian Ocean'], 'A', 'The Pacific Ocean is the largest ocean on Earth.') ] NAVY = RGBColor(10, 21, 43); NAVY2=RGBColor(16, 37, 69); BLUE=RGBColor(45, 121, 220) WHITE=RGBColor(246,248,252); MUTED=RGBColor(176,190,211); CARD=RGBColor(28,47,80) GREEN=RGBColor(45, 198, 132); GOLD=RGBColor(255, 194, 69); LINE=RGBColor(63,88,127) prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] def fill(shape, c): shape.fill.solid(); shape.fill.fore_color.rgb=c; shape.line.fill.background() def text(slide, x,y,w,h, value, size=24, color=WHITE, bold=False, align=PP_ALIGN.LEFT, font='Aptos Display'): b=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=b.text_frame; tf.clear(); tf.word_wrap=True tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0; tf.vertical_anchor=MSO_ANCHOR.MIDDLE p=tf.paragraphs[0]; p.alignment=align; r=p.add_run(); r.text=value; r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color return b def background(slide): bg=slide.background; bg.fill.solid(); bg.fill.fore_color.rgb=NAVY # decorative circles s=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(10.65), Inches(-1.1), Inches(3.2), Inches(3.2)); fill(s, NAVY2) s=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(-1.05), Inches(6.35), Inches(2.5), Inches(2.5)); fill(s, NAVY2) def transition(slide, kind='fade'): trans=OxmlElement('p:transition'); trans.set('spd','med'); trans.set('advClick','1') effect=OxmlElement('p:'+kind); trans.append(effect) slide._element.insert(-1, trans) def badge(slide, n, answer=False): s=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(.6), Inches(.48), Inches(1.75), Inches(.48)); fill(s, BLUE if not answer else GREEN) text(slide,.6,.48,1.75,.48, ('ANSWER '+str(n) if answer else 'QUESTION '+str(n)), 13, WHITE, True, PP_ALIGN.CENTER, 'Aptos') def footer(slide, n): text(slide,.65,7.02,3,.22,'QUIZ DECK • '+str(n).zfill(2)+' / 10',10,MUTED,False,font='Aptos') text(slide,10.8,7.02,1.85,.22,'Click to advance',10,MUTED,False,PP_ALIGN.RIGHT,font='Aptos') def option(slide, x,y, letter, value, correct=False): box=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(y), Inches(5.82), Inches(.78)); fill(box, GREEN if correct else CARD) box.line.color.rgb = GREEN if correct else LINE circ=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(x+.18), Inches(y+.16), Inches(.46), Inches(.46)); fill(circ, WHITE if correct else NAVY2) text(slide,x+.18,y+.16,.46,.46,letter,15, GREEN if not correct else GREEN,True,PP_ALIGN.CENTER,'Aptos') text(slide,x+.83,y+.12,4.72,.52,value,19, NAVY if correct else WHITE,correct,font='Aptos') def question_slide(i, q, opts): sl=prs.slides.add_slide(blank); background(sl); badge(sl,i) text(sl,.65,1.22,11.9,1.35,q,29,WHITE,True,font='Aptos Display') text(sl,.65,2.56,8,.35,'Choose one answer before revealing the next slide.',13,MUTED,font='Aptos') positions=[(.65,3.18),(6.85,3.18),(.65,4.22),(6.85,4.22)] for j,(x,y) in enumerate(positions): option(sl,x,y,'ABCD'[j],opts[j]) # progress text(sl,.65,5.63,2,.25,'PROGRESS',10,MUTED,True,font='Aptos') for k in range(10): r=sl.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(.65+k*.34), Inches(5.96), Inches(.23), Inches(.08)); fill(r, BLUE if k<=i-1 else LINE) footer(sl,i); transition(sl,'fade') def answer_slide(i, q, opts, key, expl): sl=prs.slides.add_slide(blank); background(sl); badge(sl,i,True) text(sl,.65,1.16,9.6,.42,'REVEAL',12,GOLD,True,font='Aptos') text(sl,.65,1.62,11.8,.95,'Correct answer',34,WHITE,True,font='Aptos Display') idx='ABCD'.index(key) hero=sl.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(.65), Inches(2.68), Inches(12.03), Inches(1.12)); fill(hero,GREEN) text(sl,.95,2.84,.55,.55,key,26,NAVY,True,PP_ALIGN.CENTER,'Aptos') text(sl,1.62,2.80,10.35,.65,opts[idx],28,NAVY,True,font='Aptos Display') text(sl,.65,4.35,1.7,.26,'WHY?',12,GOLD,True,font='Aptos') text(sl,.65,4.73,11.2,.85,expl,21,WHITE,False,font='Aptos') # low-key reviewed question text(sl,.65,6.14,11.6,.4,'Question: '+q,13,MUTED,False,font='Aptos') footer(sl,i); transition(sl,'push') # title sl=prs.slides.add_slide(blank); background(sl) text(sl,.72,1.05,3.2,.32,'INTERACTIVE QUIZ',14,GOLD,True,font='Aptos') text(sl,.72,1.55,10.5,1.25,'Test Your Knowledge',40,WHITE,True,font='Aptos Display') text(sl,.72,2.87,9.8,.55,'Bollywood, science, geography, and general knowledge',21,MUTED,font='Aptos') card=sl.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(.72),Inches(4.2),Inches(5.1),Inches(1.18)); fill(card,BLUE) text(sl,1.05,4.44,4.45,.35,'10 questions • 10 answer reveals',17,WHITE,True,font='Aptos') text(sl,.72,6.42,8.2,.28,'Each question is followed by a separate answer and explanation slide.',14,MUTED,font='Aptos') transition(sl,'fade') for i,(q,o,k,e) in enumerate(questions,1): question_slide(i,q,o); answer_slide(i,q,o,k,e) # closing sl=prs.slides.add_slide(blank); background(sl) text(sl,.72,1.42,10,.35,'QUIZ COMPLETE',14,GOLD,True,font='Aptos') text(sl,.72,2.00,10.5,.8,'Thanks for playing!',38,WHITE,True,font='Aptos Display') text(sl,.72,3.02,9.6,.55,'Review the answer slides, then challenge yourself again.',20,MUTED,font='Aptos') transition(sl,'fade') prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/bollywood-general-quiz/src/create_quiz.py" ls -lh "/tmp/workspace/bollywood-general-quiz/output/Interactive_Quiz_Questions_and_Answers.pptx"
python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/bollywood-general-quiz/output/Interactive_Quiz_Questions_and_Answers.pptx') prs=Presentation(str(p)) print('slides',len(prs.slides)) for i, slide in enumerate(prs.slides,1): tx=' | '.join(sh.text.replace('\n',' ') for sh in slide.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()) print(i, tx[:180]) print('size',p.stat().st_size) PY
Interactive Quiz Questions and Answers
Presentation · PPTX
Now make an ppt presentation with dynamic effect and answer on blank slide with correct answer and explanation and also
Which quiz section should I create first?