Sagemath, now CoCalc, using thesagetex package makes this easy. As a computer algebra system, Sage has many mathematical commands built into it. And it can evaluate the answers, too.
\documentclass{article}
\usepackage{sagetex}
\begin{document}
\begin{sagesilent}
a=Permutations([0,90,180,270,360,45,135,225,315,30,60,120,150,210,240,300,330]).random_element()
\end{sagesilent}
\noindent A random permutation of a set of your set of $\sage{len(a)}$ angles is:\\
$\sage{a}$.\\\\
Question $1$: What is $\sin(\sage{a[0]}^{\circ})$?\\
Question $2$: What is $\cos(\sage{a[1]}^{\circ})$?\\\\
Answer to Question $1$ is $\sage{sin(a[0]*pi/180)}$.\\
Answer to Question $2$ is $\sage{cos(a[1]*pi/180)}$.\\
\end{document}
The output is shown below:

The documentation on permutations is here.
EDIT: Some more details, if you're interested. Knowing Sage can do permutations, I searched the site for permutation to find documentation linked above. That told me the command a and gave sample output, something like [2,3,1]. This is what's known as a list in Python, which is basically an array in other languages. IF I had typed the Permutation command into Sage, which you can try using a Sage Cell Server here it would give a list back. That list is being stored in variable a. The 1 command is done in sagesilent environment so it is in the background. The way to get the results into LaTeX is using \sage for numbers or \sagestr for strings. The command \sage{len(a)} tells Sage determine how many elements are in the list, which is typeset between dollar signs as it is numerical data. The command \sage{a} prints out the list. Now Python refers to a list of k elements as being in the 0th, 1st, ...(k-1)st places. So \sage{a[0]} grabs the first element in my random permutation and \sage{a1} grabs the second element. Finally, we get Sage to calculate the answers, thereby minimizing the chances of a mistake. This is done with \sage{sin(a[0]*pi/180)} since Sage assumes the angle is in radians. Now Sage calculates the sine of the first angle in our list and inserts it into the document. No in depth knowledge required, just some basic skills that come up again and again.
lualatexinstead ofpdflatex). Even otherwise it's doable, just generate a random permutation (example) and print it out. – ShreevatsaR Aug 25 '17 at 22:25