# Create Answer-Dependent Questions

You can create multi-part numerical questions that require your students to enter their observed or estimated data and to perform calculations based on their data. These questions are often used for lab classes to record the results of an experiment and perform analysis of the data.

- Prerequisites
- Create Fraction Questions

- Allows students to enter observed or estimated numerical data. Any response that falls within a defined range of values is scored correct.
- Optionally, provides feedback to students for observed or estimated numerical data based on whether the value is lower than, higher than, or within the range of acceptable values.
- Requires students to perform calculations based on the provided data points.
- Enforces sequential entry of data and calculations so students cannot enter the results of calculations before entering the required data. The answer boxes for calculations are not enabled until your students enter the data required for the calculation.
- Indicates to students when a calculation was performed correctly based on
underlying data that are not within the range of acceptable values. Each
calculation is scored correct only if the calculation was performed
correctly
*and*the underlying data are within the range of acceptable values.

Like all numerical questions, answer-dependent questions can require students to specify units or to use a specified number of significant digits or decimal places in their responses.

## Example Answer-Dependent Question Without Feedback

The following table summarizes an actual question.

QID |
1589519 |

Name |
Template2 3.ANSD.01. |

Mode |
Numerical |

Question |
<eqn include('/userimages/feedback/physlabs1.pl')> Multiply two numbers between 20 and 100. <br><br> <_> × <_> = <_> |

Answer |
<EQN $A=userinput(20,100,50)> <EQN $B=userinput(20,100,50)> <EQN $A * $B> |

Display to Students |

## Example Answer-Dependent Question With Feedback and Units

The following table summarizes an actual question.

QID |
1589509 |

Name |
Template2 3.ANSD.02. |

Mode |
Numerical |

Question |
<eqn include('/userimages/feedback/physlabs1.pl')> <eqn> %feedback = (low => 'Check your measurements.', high => 'Check your measurements.'); '' </eqn> For both of the samples at your lab station, measure the volume and mass.<br> Then, calculate the density. Specify units for all values.<br><br> <table frame="void" rules="all"> <thead> <tr><th>Sample</th><th>Mass</th><th>Volume</th><th>Density</th></tr> </thead> <tbody> <tr><th>A</th><td><_></td><td><_></td><td><_></td></tr> <tr><th>B</th><td><_></td><td><_></td><td><_></td></tr> </tbody> </table> |

Answer |
<EQN $LABEL='box_massA'; $massA=userinput(0,20,10,'kg',\%feedback)> kg <EQN $LABEL='box_volA'; $volA=userinput(0,200,10,'cm^3',\%feedback)> cm^3 <EQN $LABEL='box_densityA'; $LINK='box_massA,box_volA: box_massA/box_volA'; $massA/$volA> kg/cm^3 <EQN $LABEL='box_massB'; $massB=userinput(0,20,10,'kg',\%feedback)> kg <EQN $LABEL='box_volB'; $volB=userinput(0,200,10,'cm^3',\%feedback)> cm^3 <EQN $LABEL='box_densityB'; $LINK='box_massB,box_volB: box_massB/box_volB'; $massB/$volB> kg/cm^3 |

Display to Students |