diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex b/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex new file mode 100644 index 00000000000..e82656c9f3a --- /dev/null +++ b/Master/texmf-dist/doc/latex/probsoln/samples/sample2.tex @@ -0,0 +1,47 @@ +\documentclass[a4paper]{article} + +\usepackage{probsoln} + %uncomment the following line to display the answers +\showanswers + + % The following will generate a different set of + % problems in subsequent years + %\PSNrandseed{\year} + + % The following will generate a different set of + % problems on every run (where each run is at + % least a minute apart from the previous one) +\PSNrandseed{\time} + +\begin{document} +\title{Sample Problem Sheet} +\author{Nicola Talbot} +\maketitle + +\begin{enumerate} + +\newcounter{numproblems} + % store a random number from 1 to 3 in the counter numproblems +\random{numproblems}{1}{3} + + % selects 1,2 or 3 problems from 1 of the given files: +\doforrandN{1}{\file}{1stprncp,implicit}{\selectrandomly{\file}{\value{numproblems}}} + +\item Differentiate the following functions: +\input{args}% load database +\begin{enumerate} +\newcounter{A} +\newcounter{B} +\newcounter{C} +\random{A}{-4}{5} +\random{B}{-3}{3} +\random{C}{-1}{10} +\item \useproblem{diff:quad}{\arabic{A}}{\arabic{B}}{\arabic{C}} + +\random{A}{-5}{5} + % make sure its not 0 +\whiledo{\value{A}=0}{\random{A}{-5}{5}} +\item \useproblem{diff:sin}{\arabic{A}} +\end{enumerate} +\end{enumerate} +\end{document} |