(*********************************************************************** This file was generated automatically by the Mathematica front end. It contains Initialization cells from a Notebook file, which typically will have the same name as this file except ending in ".nb" instead of ".m". This file is intended to be loaded into the Mathematica kernel using the package loading commands Get or Needs. Doing so is equivalent to using the Evaluate Initialiation Cells menu command in the front end. DO NOT EDIT THIS FILE. This entire file is regenerated automatically each time the parent Notebook file is saved in the Mathematica front end. Any changes you make to this file will be overwritten. ***********************************************************************) BeginPackage["TMKR`Setup`"]; Setup::usage = "Setup.m creates a few notebooks for writing into , and initializes the global variable qnum. It also defines some commonly used utility programs, and gives usage statements for commonly used variables."; qnum::usage = "qnum keeps track of the question number."; questions::usage = "questions is a notebook to write questions into"; answers::usage = "answers is a notebook to write questions into"; a::usage="a is a variable used in TMKR generated problems"; b::usage="b is a variable used in TMKR generated problems"; c::usage="c is a variable used in TMKR generated problems"; d::usage="d is a variable used in TMKR generated problems"; e::usage="e is a variable used in TMKR generated problems"; f::usage="f is a variable used in TMKR generated problems"; g::usage="g is a variable used in TMKR generated problems"; h::usage="h is a variable used in TMKR generated problems"; j::usage="j is a variable used in TMKR generated problems"; k::usage="k is a variable used in TMKR generated problems"; m::usage="m is a variable used in TMKR generated problems"; n::usage="n is a variable used in TMKR generated problems"; p::usage="p is a variable used in TMKR generated problems"; q::usage="q is a variable used in TMKR generated problems"; r::usage="r is a variable used in TMKR generated problems"; s::usage="s is a variable used in TMKR generated problems"; t::usage="t is a variable used in TMKR generated problems"; u::usage="u is a variable used in TMKR generated problems"; v::usage="v is a variable used in TMKR generated problems"; w::usage="w is a variable used in TMKR generated problems"; x::usage="x is a variable used in TMKR generated problems"; y::usage="y is a variable used in TMKR generated problems"; z::usage="z is a variable used in TMKR generated problems"; rand::usage="used to create random numbers more easily"; SimpleGrid::usage="Used to create a simple grid"; randex::usage="Create a random number except for..."; rot::usage="the rotation matrix for the given input angle (in degrees)"; spokes::usage="creates a set of lines that are spokes to mark off a circle"; create::usage="a simple means to call up the questions and banks"; trialrun::usage= "used to create a notebook for writing questions and answers into, after \ the original ones have been closed for whatever reason"; pickrandom::usage="picks something at random from a list"; Begin["`Private`"]; qnum = 0; answers=NotebookCreate[WindowTitle->"Answers"]; questions=NotebookCreate[WindowTitle->"Questions"]; rand[min_,max_]:=Random[Integer, {min,max}]; SimpleGrid[xl:{x_,xmin_,xmax_,delx_:1},yl:{y_,ymin_,ymax_,dely_:1}, att_List:{}]:= Graphics[Flatten[{att,Table[Line[{{xmin,y},{xmax,y}}],yl], Table[Line[{{x,ymin},{x,ymax}}],xl]}]]; randex[min_,max_,not_]:= Module[{try}, Label[start]; try=Random[Integer, {min,max}]; If[try==not, Goto[start], try]]; rot[ang_]:= N[{{Cos[ang Degree],-Sin[ang Degree]},{Sin[ang Degree],Cos[ang Degree]}}]; spokes[num_]:=( Map[Line,Table[{{0,0},10 {Cos[x], Sin[x]}}, {x,0,2 Pi,2 Pi/num}]]); create[what_]:=( If[ListQ[what],Needs[StringJoin["TMKR`Bank", ToString[what[[1]]], "`"]], Needs[StringJoin["TMKR`Bank", ToString[what], "`"]]]; If[ListQ[what],ToExpression[StringJoin["bank", ToString[what[[1]]], "[", ToString[ If[ListQ[what[[2]]],pickrandom[what[[2]]], what[[2]]] ], "]" ]],ToExpression[StringJoin["bank",ToString[what], "[]"]]] ); trialrun[]:=questions=answers=SelectedNotebook[]; pickrandom[l_List]:=Part[l, Random[Integer,{1, Length[l]}]]; End[ ]; EndPackage[ ];