Exams with Beamer

I want to create a document that can be three things:

1. a slideshow presentation,

2. a handout of the presentation with questions followed by enough space that students can write their own answers, and

3. a handout with typed solutions instead of space to handwrite solutions.

The beamer class accomplishes the first and the exam class accomplishes the second two, but because they are both classes I can't just switch back and forth between the two without creating a lot of errors due to undefined commands. I have explored many other packages that do things similar to the exam class, but none of them does everything that I am looking for. Does anyone know how I can get the functionality of both classes at once?

Edit: To clarify, I want to embed questions within frames.

\begin{frame}
\begin{questions}
\question Is this a test?
\begin{solution}[3cm]
Yes, this is a test.
\end{solution}
\end{questions}
\end{frame}

• create a new class ;) welcome to TeX.SE, just show us what you have tried so far. Them explain what you need as a combined functionality. Without that it's just an unclear question. – Raaja Dec 22 '18 at 16:41
• What exactly should the question and solution do? Maybe one could reimplement something similar with beamer. – user36296 Dec 23 '18 at 13:27
• I want to create two versions of the handout. One version gets printed out with space for students to write in answers (instead of the solution). A second version contains the solutions (instead of space to write in answers) and is made available online. – Evan Halstead Dec 23 '18 at 13:31

You can combine beamer and exam classes by using the beamerarticle package:

% For the presentation
\documentclass[ignorenonframetext]{beamer}

% for the questions and answers
%\documentclass{exam}
%\usepackage[notheorems]{beamerarticle}

\begin{document}

\begin{questions}
\question[10]
Why is there air?
\question[15]
How much wood would a woodchuck chuck if a woodchuck could chuck
wood?
\question[10] Compute $\displaystyle\int_0^1 x^2 \, dx$.
\end{questions}

\begin{frame}
content...
\end{frame}

\end{document}


Another approach: recreate the environments you need in beamer

\documentclass[notheorems]{beamer}

\newenvironment{questions}{}{}
\newcommand{\question}{}

% For the solution file
%\newenvironment{solution}{}{}

%For printing the student version
\newenvironment{solution}{\color{white}}{}

\begin{document}

\begin{frame}
\begin{questions}
\question Is this a test?
\begin{solution}
Yes, this is a test.
\end{solution}
\end{questions}
\end{frame}

\end{document}