Skip to main content
Chemistry LibreTexts

5.7: Multipart Questions

  • Page ID
    555720
  • ​

    ​

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\ket}[1]{\left| #1 \right>}\)
    \(\newcommand{\bra}[1]{\left< #1 \right|}\)
    \(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
    \(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
    \(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
    \(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
    \(\newcommand{\expect}[1]{\langle #1 \rangle}\)
    \(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Multi-Part Fill-in-the-Blank (MULTI_FIB) is best when students must supply several short answers within a single prompt. This matches many science workflows (labeling, short computed parts, or multi-step interpretation). For single-blank questions, see Fill in the Blank instead.

    Multi-blank prompts are great for short workflows, but they fail when blanks are not clearly tied to a specific request. Keep each blank's request local to the blank, keep formatting consistent across blanks, and prefer two to three blanks unless the prompt is very structured. When students miss one part, they should still understand what each other blank was asking.

    Inputs

    • question_text (str)
    • answer_map (dict): map from blank position to correct answer

    Science example (genotype to phenotype)

    question_text:
      For a monohybrid cross Aa x Aa:
      - The expected fraction of aa offspring is [blank_1].
      - The expected fraction of offspring showing the dominant phenotype is [blank_2].
    
    answer_map:
      blank_1: 1/4
      blank_2: 3/4
    

    Official example (OpenWeBWorK PG samples): Multianswer.

    Preferred PGML pattern

    Define each answer as a separate named variable and attach each one inline in the PGML blank closest to its prompt (see Answer blanks and answers for answer blank syntax). Do not use anonymous evaluator arrays or rely on implicit ANS(...) ordering.

    Context("Numeric");
    $ans_a = Compute("1/4");
    $ans_b = Compute("3/4");
    
    BEGIN_PGML
    For a monohybrid cross Aa x Aa:
    
    Part A: The expected fraction of aa offspring is [__________]{$ans_a}.
    
    Part B: The expected fraction showing the dominant
    phenotype is [__________]{$ans_b}.
    END_PGML
    

    For mixed formats (for example a RadioButtons part and a numeric part), define each answer object separately and place its blank next to the corresponding text. Keep variable naming consistent ($ans_a, $ans_b, or $ans1, $ans2).

    Complete working examples

    Genetics cross fractions -- Calculate two expected fractions from a monohybrid cross between heterozygous parents.

    ## TITLE('Monohybrid cross fractions')
    ## DESCRIPTION
    ## Calculate the expected fraction of homozygous recessive
    ## and dominant phenotype offspring from Aa x Aa.
    ## ENDDESCRIPTION
    ## KEYWORDS('genetics','monohybrid','multi-part','numeric')
    ## DBsubject('Genetics')
    ## DBchapter('Mendelian Genetics')
    ## DBsection('Monohybrid Cross')
    ## Date('2026-02-15')
    ## Author('Author name')
    ## Institution('Institution name')
    
    DOCUMENT();
    loadMacros(
    	"PGstandard.pl",
    	"MathObjects.pl",
    	"PGML.pl",
    	"PGcourse.pl",
    );
    
    Context("Numeric");
    $ans_a = Compute("1/4");
    $ans_b = Compute("3/4");
    
    BEGIN_PGML
    For a monohybrid cross Aa x Aa:
    
    Part A: The expected fraction of aa offspring is
    [__________]{$ans_a}.
    
    Part B: The expected fraction showing the dominant
    phenotype is [__________]{$ans_b}.
    END_PGML
    
    ENDDOCUMENT();
    

    Three-part dilution -- Calculate stock concentration, dilution factor, and final concentration across three answer blanks.

    ## TITLE('Three-part dilution problem')
    ## DESCRIPTION
    ## Given a dilution scenario, calculate the stock concentration
    ## in different units, the dilution factor, and the final
    ## concentration.
    ## ENDDESCRIPTION
    ## KEYWORDS('dilution','multi-part','numeric','concentration')
    ## DBsubject('Biochemistry')
    ## DBchapter('Concentrations')
    ## DBsection('Dilution')
    ## Date('2026-02-15')
    ## Author('Author name')
    ## Institution('Institution name')
    
    DOCUMENT();
    loadMacros(
    	"PGstandard.pl",
    	"MathObjects.pl",
    	"PGML.pl",
    	"PGcourse.pl",
    );
    
    Context("Numeric");
    $stock_mM = random(10, 50, 10);
    $stock_uM = Real($stock_mM * 1000);
    $dilution_factor = list_random(5, 10, 20);
    $final_uM = Real($stock_uM / $dilution_factor);
    
    BEGIN_PGML
    A stock solution has a concentration of [$stock_mM] mM.
    
    Part A: What is the stock concentration in uM?
    [__________]{$stock_uM}
    
    Part B: If you dilute it 1:[$dilution_factor], what is the
    dilution factor? [__________]{$dilution_factor}
    
    Part C: What is the final concentration in uM?
    [__________]{$final_uM}
    END_PGML
    
    ENDDOCUMENT();
    

    Authoring notes

    • Keep blanks unambiguous and label them consistently.
    • Use consistent formatting for answers (fractions vs decimals).

    This page titled 5.7: Multipart Questions was last modified on Fri, 27 Feb 2026 15:32:34 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Neil R. Voss.