(*********************************************************************** 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 Initialization 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. ***********************************************************************) Off[General::spell] Off[General::spell1] BeginPackage["TMKR`Bank1`", "TMKR`Setup`"]; Bank1::usage = "Bank1.m is a package that has questions that are area problems with combinations of simple geometric figures."; bank1::usage = "bank1[]will choose a question at random from bank1, bank1[question#] will run question # in bank1, bank1[{questionlist}] will choose a number at random from question list and run that question from bank1. There are 14 questions."; Begin["`Private`"]; bank1[]:= bank1[Random[Integer, {1,14}]]; SetAttributes[bank1, Listable]; bank1[1]:=Module[{r,a,x,val1,val2,p}, r= Random[Integer,{5,15}]; a=r + 2 + Random[Integer, {5 ,10 } ]; x=r (a+r)/(a-r); val1 = Round[x + r]; val2 = a+ r; p=Show[Graphics[{{GrayLevel[0.6], Polygon[{{-r,-r}, {x, -r}, {-r, a}, {-r,-r}}]},{GrayLevel[ 1],Disk[{0,0}, r]}, Line[{{-0.9 r, -r}, {-0.9 r,-0.9 r}, {-r, -0.9 r}}], Line[{{-r,-r}, {x, -r}, {-r, a}, {-r,-r}}], {AbsolutePointSize[6],Point[{0,0}]}, Line[{{0,0}, {r,0}}], Text[FontForm[ToString[r], {"Times", 18}], {r/2, -1}, {0,1}], Text[FontForm[ ToString[Round[val1]], {"Times", 18}], {-r +(r+x)/2, -r-1}, {0,1}], Text[FontForm[ ToString[Round[val2]], {"Times", 18}], { -r-1, -r +(a+r)/2},{1,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity, ImageSize->{400,400}]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of this right triangle. Dimensions \ are in meters. Round your answer to the nearest whole square meter." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "The area of the shaded portion is ", Round[ (0.5 )val1 val2 - (\[Pi] r r)], " square meters" }],"Text"]]; NotebookWrite[answers,Cell[TextData[{ "Take the area of the triangle ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["A", "t"], "=", RowBox[{ FractionBox["1", "2"], "b", " ", "h"}]}], TraditionalForm]]], " and subtract the area of the circle, ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["A", "c"], "=", RowBox[{"\[Pi]", " ", SuperscriptBox["r", "2"]}]}], TraditionalForm]]], ". This is ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", val1, ")"}], RowBox[{"(",val2, ")"}]}], " ", "-", " ", RowBox[{"\[Pi]", " ", SuperscriptBox[ RowBox[{"(",r, ")"}], "2"]}]}], TraditionalForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 1"],"Text"]] ]; bank1[2]:=Module[{bl, r, b2, b3, ans, p}, b1=Random[Integer, {5,25}]; r = Random[Integer, {3,8}]; b2 = Random[Integer, {5,10}]; b3 = b1 + b2; ans = (0.5 b2 2r)+ (b1 2r) + (0.5 \[Pi] r r)//Round; p= Show[Graphics[{ Line[{{b1,0}, {-b2,0}, {0, 2 r}, {b1,2r}}], Circle[{b1,r}, r, {-\[Pi]/2 , \[Pi]/2}], {PointSize[0.03], Point[{b1,r}]}, Line[{{b1,r}, {b1,r} + r {Cos[\[Pi]/4], Sin[\[Pi]/4]}}], Text[FontForm[b3, {"Times", 18}], {(b1-b2)/2, -1.5}], Text[FontForm[b1, {"Times", 18}], {b1/2, 1.5 + 2r}], Text[FontForm[r, {"Times", 18}], {b1+2, r}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of this figure to the nearest whole square inch. Lines \ that look parallel are parallel. Dimensions are in inches." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of this figure to the nearest whole square inch. Lines \ that look parallel are parallel. Dimensions are in inches." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers,Cell[TextData[{ "There are three parts to add together "}], "Text"]]; NotebookWrite[answers,Cell[TextData[{ "A half circle, whose area is ", Cell[BoxData[ FormBox[ RowBox[{ FractionBox["1", "2"], "\[Pi]", " ", SuperscriptBox[r, "2"]}], TraditionalForm]]], ", which is approximately ", Round[0.5 \[Pi] r^2], " square inches ." }], "Text"]]; NotebookWrite[answers,Cell[TextData[{ "A rectangle whose dimensions are ", b1, " by ", 2 r , " and whose area is ", b1 2r , " square inches . " }], "Text"]]; NotebookWrite[answers,Cell[TextData[{ "A triangle whose height is ", 2 r, " and whose base is ", b2, " . The area of the triangle is ", r b2, " square inches ."}], "Text"]]; NotebookWrite[answers, Cell[TextData[{"Add these together for the total area ." }],"Text"]]; NotebookWrite[answers,Cell[TextData[{ ans , " square inches" }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 2"],"Text"]]; ] bank1[3]:=Module[{base, height, sqlen, sqposx, sqposy,p}, Label[start]; base=Random[Integer, {5,30}]; height=Random[Integer, {5,30}]; sqlen= Random[Integer,{4,15}]; sqposx = Random[Integer, {1,base}]; If [sqposx+sqlen>base-1, Goto[start]]; sqposy= Random[Integer, {1,height}]; If[sqposy+sqlen>height-1, Goto[start]]; p =Show[Graphics[{ {GrayLevel[0.7], Polygon[{{0,0}, {base,0}, {base, height}, {0,height}, {0,0}}]}, Line[{{0,0}, {base,0}, {base, height}, {0,height}, {0,0}}], {GrayLevel[1], Polygon[{{sqposx, sqposy}, {sqposx+sqlen, sqposy}, {sqposx+ sqlen, sqposy+sqlen},{sqposx, sqposy+sqlen},{sqposx, sqposy}}]}, Line[{{sqposx, sqposy}, {sqposx+sqlen, sqposy}, {sqposx+ sqlen, sqposy+sqlen},{sqposx, sqposy+sqlen},{sqposx, sqposy}}], Text[FontForm[sqlen, {"Times",18}], {sqposx+sqlen/2, sqposy}, {0,-1}], Text[FontForm[base, {"Times",18}], {base/2, 0}, {0,2}], Text[FontForm[height, {"Times",18}], {base, height/2}, {-2,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of the figure. All angles are right \ angles. Dimensions are in inches. The figure in the shaded region is a \ square. " }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of the figure. All angles are right \ angles. Dimensions are in inches. The figure in the shaded region is a \ square. " }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "To find the area of the shaded portion of the figure, find the area of the \ outside rectangle and subtract the area of the inside square. ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["A", "shaded"], "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(",base, ")"}], RowBox[{"(", height, ")"}]}], " ", "-", " ", SuperscriptBox[ RowBox[{"(",sqlen, ")"}], "2"]}], "=", " ", base height - sqlen^2}]}], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SuperscriptBox["m", "2"], StandardForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 3"],"Text"]]; ] bank1[4]:=Module[{p, rad}, p=Show[Graphics[{ {GrayLevel[0.8], Disk[{0,0}, 1]} ,Circle[{0,0}, 1], {GrayLevel[1],Polygon[{{-1,0}, {1,0}, {0,1}, {-1,0}}]}, Line[{{-1,0}, {1,0}, {0,1}, {-1,0}}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; rad=Random[Integer, {1,200}]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "The circle shown below has a radius of ", rad, " cm. The base of the triangle is a diameter of the circle. The \ altitude drawn from this base is a radius of the circle. Find the area of \ the shaded region of the diagram." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "The circle shown below has a radius of ", rad, " cm. The base of the triangle is a diameter of the circle. The \ altitude drawn from this base is a radius of the circle. Find the area of \ the shaded region of the diagram." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers, Cell[TextData[{"The area of the shaded region will be the area of the \ circle minus the area of the triangle." }],"Text"]]; NotebookWrite[answers,Cell[TextData[{"The area of the circle is given by ", Cell[BoxData[ FormBox[ RowBox[{"A", "=", RowBox[{ RowBox[{"\[Pi]", " ", SuperscriptBox["r", "2"]}], "=", " ", RowBox[{ SuperscriptBox[ RowBox[{"\[Pi]", "(", rad, ")"}], "2"], "=", " ", RowBox[{rad rad, " ", "\[Pi]"}]}]}]}], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SuperscriptBox["cm", "2"], TraditionalForm]]], "\nThe area of the triangle is given by ", Cell[BoxData[ FormBox[ RowBox[{"A", "=", RowBox[{ RowBox[{ FractionBox["1", "2"], "b", " ", "h"}], " ", "=", " ", RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", 2 rad, ")"}], RowBox[{"(", rad, ")"}]}], "=", ToBoxes[rad rad]}]}]}], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SuperscriptBox["cm", "2"], TraditionalForm]]], "\nThe area of the shaded region is ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{rad rad, "\[Pi]"}], "-", rad rad}], " "}], TraditionalForm]]], "\[TildeTilde] ",Cell[BoxData[ToBoxes[rad rad \[Pi] - rad rad//N]]]," ", Cell[BoxData[ FormBox[ SuperscriptBox["cm", "2"], TraditionalForm]]] }], "Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 4"],"Text"]]; ] bank1[5]:=Module[{x1,x2,y1,y2,p,p1}, x1=Random[Integer, {5,15}]; x2=Random[Integer, {5,15}]; y1=Random[Integer, {2,5}]; y2=Random[Integer, {5,15}]; p=Show[Graphics[{ Line[{{0,0}, {x1+x2, 0}, {x1 + x2, y1 + y2}, {x1, y1 + y2}, {x1, y1}, {0, y1}, {0,0}}], Text[FontForm[ToString[y1], {"Times", 18}], {0, y1/2}, {1,0}], Text[FontForm[ToString[x1], {"Times", 18}], {x1/2, y1}, {0,-1}], Text[FontForm[ToString[y2], {"Times", 18}], {x1, y1+ y2/2}, {1,0}], Text[FontForm[ToString[x2], {"Times", 18}], {x1 + x2/2, y1 + y2}, {0,-1}], Text[FontForm[ToString[y1+y2], {"Times", 18}], {x1+x2, (y1+y2)/2}, {-1, 0}], Text[FontForm[ToString[x1+x2], {"Times", 18}], {(x1+x2)/2,0}, {0,1}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; p1=Show[Graphics[{ Line[{{0,0}, {x1+x2, 0}, {x1 + x2, y1 + y2}, {x1, y1 + y2}, {x1, y1}, {0, y1}, {0,0}}], {Dashing[{0.02, 0.02}], Line[{{x1,y1},{x1+x2,y1}}]}, Text[FontForm[ToString[y1], {"Times", 18}], {0, y1/2}, {1,0}], Text[FontForm[ToString[x1], {"Times", 18}], {x1/2, y1}, {0,-1}], Text[FontForm[ToString[y2], {"Times", 18}], {x1, y1+ y2/2}, {1,0}], Text[FontForm[ToString[x2], {"Times", 18}], {x1 + x2/2, y1 + y2}, {0,-1}], Text[FontForm[ToString[y1+y2], {"Times", 18}], {x1+x2, (y1+y2)/2}, {-1, 0}], Text[FontForm[ToString[x1+x2], {"Times", 18}], {(x1+x2)/2,0}, {0,1}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Corners that look square are \ square. Dimensions are in furlongs."}], "Text"]]; NotebookWrite[questions, Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Corners that look square are \ square. Dimensions are in furlongs."}], "Text"]]; NotebookWrite[answers, Cell[GraphicsData["PostScript", DisplayString[ p1]]]]; NotebookWrite[answers, Cell[TextData[{"One way to do the area is to divide the figure as shown \ above, or some other convenient way. This divides the figure into two \ rectangles, and the area of the two rectangles can be added together to give \ the total area."}], "Text"]]; NotebookWrite[answers,Cell[TextData[{"One rectangle has dimensions of ", y1, " by ", x1 + x2, " for an area of ", y1(x1+x2), " square furlongs, the other rectangle has dimensions of ", y2, " by ", x2, " for an area of ", x2 y2 , " square furlongs. The total area is ", x2 y2 + y1(x1+x2), " square furlongs." }], "Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 5"],"Text"]]; ] bank1[6]:=Module[{x1,x2,y1,y2,p,p1}, x1=Random[Integer, {5,15}]; x2=Random[Integer, {5,15}]; y1=Random[Integer, {2,5}]; y2=Random[Integer, {5,15}]; p=Show[Graphics[{ Line[{{0,0}, {x1+x2, 0}, {x1 + x2, y1 + y2}, {x1, y1 + y2}, {x1, y1}, {0, y1}, {0,0}}], Text[FontForm[ToString[y1], {"Times", 18}], {0, y1/2}, {1,0}], Text[FontForm[ToString[y2], {"Times", 18}], {x1, y1+ y2/2}, {1,0}], Text[FontForm[ToString[x2], {"Times", 18}], {x1 + x2/2, y1 + y2}, {0,-1}], Text[FontForm[ToString[x1+x2], {"Times", 18}], {(x1+x2)/2,0}, {0,1}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; p1=Show[Graphics[{ Line[{{0,0}, {x1+x2, 0}, {x1 + x2, y1 + y2}, {x1, y1 + y2}, {x1, y1}, {0, y1}, {0,0}}], {Dashing[{0.02, 0.02}], Line[{{x1,y1},{x1+x2,y1}}]}, Text[FontForm[ToString[y1], {"Times", 18}], {0, y1/2}, {1,0}], Text[FontForm[ToString[x1], {"Times", 18}], {x1/2, y1}, {0,-1}], Text[FontForm[ToString[y2], {"Times", 18}], {x1, y1+ y2/2}, {1,0}], Text[FontForm[ToString[x2], {"Times", 18}], {x1 + x2/2, y1 + y2}, {0,-1}], Text[FontForm[ToString[y1+y2], {"Times", 18}], {x1+x2, (y1+y2)/2}, {-1, 0}], Text[FontForm[ToString[x1+x2], {"Times", 18}], {(x1+x2)/2,0}, {0,1}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Corners that look square are \ square. Dimensions are in stadia."}], "Text"]]; NotebookWrite[questions, Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Corners that look square are \ square. Dimensions are in stadia."}], "Text"]]; NotebookWrite[answers, Cell[GraphicsData["PostScript", DisplayString[ p1]]]]; NotebookWrite[answers, Cell[ TextData[{"The missing dimensions can be determined using the ones \ given. One way to find the area is to divide the figure as shown above, or \ some other convenient way. This divides the figure into two rectangles, and \ the area of the two rectangles can be added together to give the total \ area."}], "Text"]]; NotebookWrite[answers,Cell[TextData[{"One rectangle has dimensions of ", y1, " by ", x1 + x2, " for an area of ", y1(x1+x2), " square stadia, the other rectangle has dimensions of ", y2, " by ", x2, " for an area of ", x2 y2 , " square stadia. The total area is ", x2 y2 + y1(x1+x2), " square stadia." }], "Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 6"],"Text"]]; ] bank1[7]:=Module[{base, height, sqlen, sqposx, sqposy,sqwidth,p}, Label[start]; base=Random[Integer, {5,30}]; height=Random[Integer, {5,30}]; sqlen= Random[Integer,{4,20}]; sqwidth= Random[Integer,{2,10}]; sqposx = Random[Integer, {1,base}]; If [sqposx+sqlen>base-1, Goto[start]]; sqposy= Random[Integer, {1,height}]; If[sqposy+sqwidth>height-1, Goto[start]]; p =Show[Graphics[{ {GrayLevel[0.7], Polygon[{{0,0}, {base,0}, {base, height}, {0,height}, {0,0}}]}, Line[{{0,0}, {base,0}, {base, height}, {0,height}, {0,0}}], {GrayLevel[1], Polygon[{{sqposx, sqposy}, {sqposx+sqlen, sqposy}, {sqposx+ sqlen, sqposy+sqwidth},{sqposx, sqposy+sqwidth},{sqposx, sqposy}}]}, Line[{{sqposx, sqposy}, {sqposx+sqlen, sqposy}, {sqposx+ sqlen, sqposy+sqwidth},{sqposx, sqposy+sqwidth},{sqposx, sqposy}}], Text[FontForm[sqlen, {"Times",18}], {sqposx+sqlen/2, sqposy}, {0,1}], Text[ FontForm[sqwidth, {"Times",18}], {sqposx, sqposy+sqwidth/2}, {1, 0}], Text[FontForm[base, {"Times",18}], {base/2, 0}, {0,2}], Text[FontForm[height, {"Times",18}], {base, height/2}, {-2,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of the figure. All angles are right \ angles. Dimensions are in inches. " }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of the figure. All angles are right \ angles. Dimensions are in inches. " }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "To find the area of the shaded portion of the figure, find the area of the \ outside rectangle and subtract the area of the inside rectangle. ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["A", "shaded"], "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(",base, ")"}], RowBox[{"(", height, ")"}]}], " ", "-", " ", "(",sqlen, ")(", sqwidth, ")" }], "=", " ", base height - sqlen sqwidth}]}], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SuperscriptBox["m", "2"], StandardForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 7"],"Text"]]; ] bank1[8]:=Module[{y1,x1,x2,p,p1}, y1=Random[Integer, {5,25}]; x1=Random[Integer, {5,15}]; x2=Random[Integer, {5,20}]; p=Show[Graphics[{ Line[{{0,0}, {0,y1}, {x1,y1}, {x1+x2,0}, {0,0}}], Text[FontForm[ToString[y1], {"Times",18}], {0,y1/2}, {1,0}], Text[FontForm[ToString[x1], {"Times",18}], {x1/2,y1}, {0,-1}], Text[FontForm[ToString[x1+x2], {"Times",18}], {(x1+x2)/2,0}, {0,1}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; p1=Show[Graphics[{ Line[{{0,0}, {0,y1}, {x1,y1}, {x1+x2,0}, {0,0}}], {Dashing[{0.02, 0.02}], Line[{{x1,0}, {x1,y1}}]}, Text[FontForm[ToString[y1], {"Times",18}], {0,y1/2}, {1,0}], Text[FontForm[ToString[x1], {"Times",18}], {x1/2,y1}, {0,-1}], Text[FontForm[ToString[x2], {"Times",18}], {x1+x2/2,0}, {0,-1}], Text[FontForm[ToString[y1], {"Times",18}], {x1,y1/2}, {-1,0}] }], AspectRatio->Automatic, PlotRange->All,DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the figure. Corners that look square , are square. \ Dimensions are in nanometers." }], "Text"]]; NotebookWrite[questions, Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the figure. Corners that look square , are square. \ Dimensions are in nanometers. The figure can be divided up into a rectangle \ and a triangle as shown below." }], "Text"]]; NotebookWrite[answers, Cell[GraphicsData["PostScript", DisplayString[ p1]]]]; NotebookWrite[answers, Cell[TextData[{"The area will be the sum of the area of the triangle \ and the rectangle, ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", x2, ")"}], RowBox[{"(", y1, ")"}]}], " ", "+", " ", RowBox[{ RowBox[{"(", x1, ")"}], RowBox[{"(", y1, ")"}]}]}], " ", "=", " ", 0.5 x2 y1 + x1 y1}], TraditionalForm]]], " square nanometers." }], "Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 8"],"Text"]]; ] bank1[9]:=Module[{base, height, triheight, triposx,triposy,tribase,p}, Label[start]; base=Random[Integer, {5,30}]; height=Random[Integer, {5,30}]; tribase= Random[Integer,{4,10}]; triposx = Random[Integer, {1,base}]; triheight=Random[Integer, {5,20}]; If [triposx+tribase>base-1, Goto[start]]; triposy= Random[Integer, {1,height}]; If[triposy+triheight>height-1, Goto[start]]; p =Show[Graphics[{ {GrayLevel[0.7], Polygon[{{0,0}, {base,0}, {base, height}, {0,height}, {0,0}}]}, Line[{{0,0}, {base,0}, {base, height}, {0,height}, {0,0}}], {GrayLevel[1], Polygon[{{triposx, triposy}, {triposx+tribase, triposy}, {triposx, triposy+triheight},{triposx, triposy}}]}, Line[{{triposx, triposy}, {triposx+tribase, triposy}, {triposx, triposy+triheight},{triposx, triposy}}], Line[{{triposx + 1, triposy}, {triposx + 1, triposy+1}, {triposx, triposy+1}}], Text[FontForm[tribase, {"Times",18}], {triposx+tribase/2, triposy}, {0, 1}], Text[ FontForm[triheight, {"Times",18}], {triposx, triposy+triheight/2}, {1,0}], Text[FontForm[base, {"Times",18}], {base/2, 0}, {0,2}], Text[FontForm[height, {"Times",18}], {base, height/2}, {-2,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of this rectangle. Dimensions are \ in yards. " }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of this rectangle. Dimensions are \ in yards. " }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "To find the area of the shaded portion of the figure, find the area of the \ outside rectangle and subtract the area of the inside triangle. ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["A", "shaded"], "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(",base, ")"}], RowBox[{"(", height, ")"}]}], " ", "-", " ", FractionBox[1,2], "(",tribase, ")(", triheight, ")" }], "=", " ", base height - 0.5tribase triheight}]}], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SuperscriptBox["yards", "2"], StandardForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 9"],"Text"]]; ] bank1[10]:=Module[{x1,y1,h,x2,y2,p}, x1= Random[Integer, {5, 15}]; y1=Random[Integer, {5,10}]; h=Random[Integer, {2,15}]; x2 = x1 + Random[Integer, {1,15}]; y2=y1 + h + Random [Integer, {1,15}]; p=Show[Graphics[{ {GrayLevel[0.6], Polygon[{{-x2, -y2+h + y1},{-x2, y1+h + y2}, {x2, -y2+h + y1}, {-x2, -y2+h + y1}}]}, Line[{{-x2, -y2+h + y1},{-x2, y1+h + y2}, {x2, -y2+h + y1}, {-x2, -y2+h + y1}}], {GrayLevel[1], Polygon[{{0,0}, {-x1, 0}, {0,y1}, {0,0}}]}, Line[{{0,0}, {-x1, 0}, {0,y1}, {0,0}}], Line[{{-x2+2, -y2+h+y1}, {-x2+2, -y2+h+y1+2}, {-x2, -y2+h+y1+2}}], Line[{{-2,0}, {-2,2}, {0,2}}], Text[FontForm[ToString[x1], {"Times", 18}], {-x1/2,0}, {0,1}], Text[FontForm[ToString[y1], {"Times", 18}], {0,y1/2}, {-1,0}], Text[FontForm[ToString[2 x2], {"Times", 18}], {0,y1+h-y2}, {0,1}], Text[FontForm[ToString[2 y2], {"Times", 18}], {-x2,h}, {1,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of the figure shown below. \ Dimensions are in cm." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of the figure shown below. \ Dimensions are in cm." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "These are two right triangles, so we know the base and height of both. \ To find the area of the shaded portion, take the area of the larger triangle \ and subtract the area of the smaller triangle." }],"Text"]]; NotebookWrite[answers, Cell[TextData[{"The area of the shaded region is ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ FractionBox["1", "2"], RowBox[{"(", 2 x2, ")"}], RowBox[{"(", 2 y2, ")"}]}], " ", "-", " ", RowBox[{ FractionBox["1", "2"], RowBox[{"(", x1, ")"}], RowBox[{"(", y1, ")"}]}]}], " ", "=", " ", 0.5 (2x2 2 y2 - x1 y1) }], TraditionalForm]]], " ", Cell[BoxData[ FormBox[ SuperscriptBox["cm", "2"], TraditionalForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 10"],"Text"]]; ] bank1[11]:=Module[{radius, xmore, p}, radius = Random[Integer, {5,20}]; xmore=Random[Integer, {10,40}]; p=Show[Graphics[{ {GrayLevel[0.6], Polygon[{{0,0}, {2radius + xmore, 0}, {2 radius + xmore, 2 radius}, {0, 2 radius}, {0,0}}]}, {GrayLevel[1],Disk[{radius, radius}, radius]}, Line[{{0,0}, {2radius + xmore, 0}, {2 radius + xmore, 2 radius}, {0, 2 radius}, {0,0}}], {PointSize[0.02], Point[{radius, radius}]}, Line[{{radius, radius}, {radius, radius} + radius{Cos[\[Pi]/4], Sin[\[Pi]/4]}}], Text[FontForm[ToString[xmore+2radius], {"Times",18}], {(xmore+2radius)/2, 0}, {0,1}], Text[ FontForm[ToString[2radius], {"Times",18}], {xmore+2radius, radius}, {-1,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of this rectangle. Dimensions are \ in meters. The radius of the circle is ", radius, " meters." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the shaded portion of this rectangle. Dimensions are \ in meters. The radius of the circle is ", radius, " meters." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "The area of the shaded portion of the rectangle is the area of the \ rectangle minus the area of the circle." }],"Text"]]; NotebookWrite[answers,Cell[TextData[{ "The area is ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", 2 radius + xmore, ")"}], RowBox[{"(", 2 radius, ")"}]}], " ", "-", " ", RowBox[{"\[Pi]", " ", SuperscriptBox[ RowBox[{"(", radius, ")"}], "2"]}]}], "\[TildeTilde]", ToBoxes[(2 radius + xmore)(2 radius) - \[Pi] radius^2//N, TraditionalForm], " ", SuperscriptBox["m", "2"]}], TraditionalForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 11"],"Text"]]; ] bank1[12]:=Module[{triheight, width, length,p}, triheight=Random[Integer, {5,10}]; width = Random[Integer, {5,15}]; length=width + 1 + Random[Integer,{5,10}]; p=Show[Graphics[{ Line[{{0,0}, {length, 0}, {length, width}, {length/2, width + triheight}, {0, width}, {0,0}}], {Dashing[{0.02, 0.02}], Line[{{0,width}, {length, width}}], Line[{{length/2, width}, {length/2, width + triheight}}]}, Line[{{1,0}, {1,1}, {0,1}}], Line[{{length-1, 0}, {length - 1, 1}, {length, 1}}], Line[{{1,width}, {1,width - 1}, {0,width -1}}], Line[{{length-1, width}, {length - 1, width-1}, {length, width-1}}], Line[{{1+length/2, width}, {1 + length/2, width + 1}, {length/2, width +1}}], Text[FontForm[ToString[length], {"Times",18}], {length/2, 0}, {0,1}], Text[ FontForm[ToString[width], {"Times",18}], {length, width/2}, {-1, 0}], Text[ FontForm[ToString[triheight], {"Times",18}], {length/2, width + triheight/2}, {1,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Dimensions are in feet." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Dimensions are in feet." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "The area of the figure can be found by adding together the area of the \ rectangle and the area of the triangle." }],"Text"]]; NotebookWrite[answers,Cell[TextData[{ "The area is ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(",length, ")"}], RowBox[{"(", width, ")"}]}], " ", "+", " ", RowBox[{ FractionBox["1", "2"], RowBox[{"(", length, ")"}], RowBox[{"(",triheight, ")"}]}]}], " ", "=", " ", ToBoxes[length width + 0.5 length triheight//N, TraditionalForm], " ", SuperscriptBox["ft", "2"]}], TraditionalForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 12"],"Text"]]; ] bank1[13]:=Module[{triheight, width, x1,x2,length,p}, x1=Random[Integer, {10,20}]; x2=Random[Integer, {5,10}]; triheight=Random[Integer, {5,10}]; width = Random[Integer, {5,15}]; length=x1+x2; p=Show[Graphics[{ Line[{{0,0}, {length, 0}, {length, width}, {x1, width + triheight}, {0, width}, {0,0}}], {Dashing[{0.02, 0.02}], Line[{{0,width}, {length, width}}], Line[{{x1, width}, {x1, width + triheight}}]}, Line[{{1,0}, {1,1}, {0,1}}], Line[{{length-1, 0}, {length - 1, 1}, {length, 1}}], Line[{{1,width}, {1,width - 1}, {0,width -1}}], Line[{{length-1, width}, {length - 1, width-1}, {length, width-1}}], Line[{{1+x1, width}, {1 + x1, width + 1}, {x1, width +1}}], Text[FontForm[ToString[length], {"Times",18}], {length/2, 0}, {0,1}], Text[ FontForm[ToString[width], {"Times",18}], {length, width/2}, {-1, 0}], Text[ FontForm[ToString[triheight], {"Times",18}], {x1, width + triheight/2}, {1,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Dimensions are in feet." }],"Text"]]; NotebookWrite[questions,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of the figure shown below. Dimensions are in feet." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[ p]]]]; NotebookWrite[answers,Cell[TextData[{ "The area of the figure can be found by adding together the area of the \ rectangle and the area of the triangle." }],"Text"]]; NotebookWrite[answers,Cell[TextData[{ "The area is ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"(",length, ")"}], RowBox[{"(", width, ")"}]}], " ", "+", " ", RowBox[{ FractionBox["1", "2"], RowBox[{"(", length, ")"}], RowBox[{"(",triheight, ")"}]}]}], " ", "=", " ", ToBoxes[length width + 0.5 length triheight//N, TraditionalForm], " ", SuperscriptBox["ft", "2"]}], TraditionalForm]]] }],"Text"]]; NotebookWrite[answers, Cell[TextData["Question I.D., Bank 1, 13"],"Text"]]; ] bank1[14]:=Module[{base, width, height, p}, base=Random[Integer, {10,30}]; width = Random[Integer, {5,20}]; height=Random[Integer, {5,15}]; p=Show[Graphics[{ Line[{{0,0}, {base, 0}, {base, width}, {base/2, width + height}, {0, width}, {0,0}}], Line[{{1,0}, {1,1}, {0,1}}], Line[{{base-1,0},{base-1,1}, {base,1}}], Line[{{base + 2, width}, {base+4, width}}], Line[{{base+2, width + height}, {base + 4, width+height}}], {Dashing[{0.03, 0.03}], Line[{{1 + base/2, width + height}, {base, width + height}}]}, Line[{{base +3, width}, {base + 3, width + height}}], Text[FontForm[base, {"Times", 18}], {base/2,0}, {0,1}], Text[FontForm[width, {"Times", 18}], {base,width/2}, {-1,0}], Text[FontForm[width, {"Times", 18}], {0,width/2}, {1,0}], Text[FontForm[height, {"Times", 18}], {base+3,width+height/2}, {-1,0}] }], AspectRatio->Automatic, PlotRange->All, DisplayFunction->Identity]; qnum=qnum+1; NotebookWrite[questions,Cell[TextData[{qnum, ".\t", "Find the area of this figure. Dimensions are in kilometers." }],"Text"]]; NotebookWrite[questions, Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers,Cell[TextData[{qnum, ".\t", "Find the area of this figure. Dimensions are in kilometers." }],"Text"]]; NotebookWrite[answers,Cell[GraphicsData["PostScript", DisplayString[p]]]]; NotebookWrite[answers,Cell[TextData[{ "This figure is made up of a rectangle with dimensions of ", base, " and ", width, " , and a triangle whose base is ", base, " and whose height is ", height, " . Add together the area of the rectangle, which is ", base width, " square kilometers, and the area of the triangle, which is ", Cell[ToBoxes[0.5 base height, TraditionalForm]], " square kilometers, for the final answer of ", Cell[ToBoxes[base width + 0.5 base height, TraditionalForm]], " square kilometers." }],"Text"]]; NotebookWrite[answers,Cell[TextData[{ "Question I.D., Bank 1, 14" }],"Text"]]; ] End[ ]; EndPackage[ ];