Thanks everyone for your comments of goodness.
I have been using Dan Drake's SageTeX for a couple weeks now ... and
it is nothing short of incredulous! I will be sure to share all my
working examples once I get them going.
I have made some progress this weekend after playing around a bit. I
am very confident that I can generate the randomly generated
worksheets, but I am having a problem creating the solution sheets. I
am sure my method of generating the sheets is not elegant nor
optimized.
I have a very SIMPLE example of generating random dyadic
operations ... let's use addition. I am using tables, so that the
layout looks consistent.
%Define the greatest term, t, to be used. In this example it will be
44
\begin{sagesilent}
t=44
\end{sagesilent}
\begin{tabular}{|c|c|c|c|c|}
\hline $\sage{ZZ.random_element(t)}$ & + & $\sage{ZZ.random_element(t)}
$ &$ =\\\hline
\hline $\sage{ZZ.random_element(t)}$ & + & $\sage{ZZ.random_element(t)}
$ &$ =\\\hline
\hline $\sage{ZZ.random_element(t)}$ & + & $\sage{ZZ.random_element(t)}
$ &$ =\\\hline
\hline $\sage{ZZ.random_element(t)}$ & + & $\sage{ZZ.random_element(t)}
$ &$ =\\\hline
\hline $\sage{ZZ.random_element(t)}$ & + & $\sage{ZZ.random_element(t)}
$ &$ =\\\hline
\hline $\sage{ZZ.random_element(t)}$ & + & $\sage{ZZ.random_element(t)}
$ &$ =\\\hline
.
.
.
\end{tabular}
This works brilliantly! Awesome ... I can now create awesome sheets
of goodness using this method. The problem is if I want to provide
answers and in more complicated problems ... solutions. They only way
that I have come up with is defining the operands in the sagesilent.
The reason is that I can manipulate my defined operands, in this case
sum them. More specifically, the problem is that I can only define
alpha constants, which are random numbers, a-z. If I define a
constant as "aa" or "a0", it does not compile? It would be a little
work to assign all the constants, but I am sure it would be worth it.
I can't figure out why this won't work. Is the following syntax
incorrect?
\begin{sagesilent}
t=43
a=ZZ.random_element(t) --- >this works
a0=ZZ.random_element(t) ---> this does not work
\end{sagesilent}
Any ideas on how to assign random numbers to constants?
Any ideas on how to simplify this procedure?
Here is an example that I could use to generate the worksheet and the
answer sheet by using defined constants:
\begin{sagesilent}
t=44
a=ZZ.random_element(t)
b=ZZ.random_element(t)
c=ZZ.random_element(t)
d=ZZ.random_element(t)
.
.
.
I run out of constants :(
\end{sagesilent}
\begin{tabular}{|c|c|c|c|c|}
\hline $\sage{a}$ & + & $\sage{b}$ &$ =$ & $\sage{a+b}$\\\hline
\hline $\sage{c}$ & + & $\sage{d}$ &$ =$ & $\sage{c+d}$\\\hline
.
.
.
\end{tabular}
Thank you everyone for your comments ... much appreciated :D
Mark