# Examples for input number questions¶

\begin{question}
\text{\textbf{1. variables: randint, randadjustIf, function; corrector: solution{function with random variables}  }\\
\textit{Determine the decimal expansion of $f$ to three decimal places.}}
\explanation{Think about what rounded off to three decimal places means.}

\type{input.number}
\precision{3}
\field{real}

\begin{variables}
\function{f}{a/b}
\randint{a}{11}{16}
\randint{b}{11}{16}

\end{variables}

\solution{f}
\end{question}


\begin{question}
\text{\textbf{2. variables: numbers drawn from pool of variables, function; corrector: solution{variable}}\\
\textit{Calculate $func$ and give the answer as a fraction \frac{a}{b} in its lowest terms.}}
\explanation{Do not forget to do cancellations in the answer.}

\type{input.number}
\field{integer}

\begin{variables}
\function{func}{a/b - c/d}
\end{variables}

\begin{pool}
\begin{variables}
\number{a}{7}
\number{b}{18}
\number{c}{16}
\number{d}{99}
\number{e}{5}
\number{f}{22}
\end{variables}

\begin{variables}
\number{a}{7}
\number{b}{20}
\number{c}{5}
\number{d}{28}
\number{e}{6}
\number{f}{35}
\end{variables}
\end{pool}

\text{a = }
\solution{e}

\text{b = }
\solution{f}
\end{question}

\begin{question}
\textit{What are the roots of f(x)=$f$ ?}}
\explanation{}

\type{input.number}
\field{real}

\begin{variables}
\function[expand]{f}{(x-a)(x-b)}
\randint[Z]{a}{-5}{5}
\randint[Z]{b}{-5}{5}

\end{variables}