The probsoln-package allows the creation of problem sheets with randomly selected problems and optionally the solution.
The package is designed for lecturers who have to generate new problem sheets for their students on a regular basis (e.g. yearly) by randomly selecting a specified number of problems defined in another file.
There is an option that can be passed to the package to determine whether or not the solutions should be printed.