diff --git a/source/precalculus/exercises/bank.xml b/source/precalculus/exercises/bank.xml index 0d1cc141c..f7a256bfe 100644 --- a/source/precalculus/exercises/bank.xml +++ b/source/precalculus/exercises/bank.xml @@ -436,7 +436,6 @@ Use the law of sines and/or the law of cosines to solve non-right triangles. - + diff --git a/source/precalculus/exercises/outcomes/TE/TE6/generator.sage b/source/precalculus/exercises/outcomes/TE/TE6/generator.sage new file mode 100644 index 000000000..6ff78c33e --- /dev/null +++ b/source/precalculus/exercises/outcomes/TE/TE6/generator.sage @@ -0,0 +1,213 @@ +load("../../../source/common/sagemath/library.sage") +class Generator(BaseGenerator): + def data(self): + + names=["Mateo", "Nina", "Ophelia", "Pierre", "Quinn", "Rosa", "Serena", "Thad", "Ursula","Victor"] + + scenario1=choice(["ladder","elevation","angleofclimb","fire","scuba"]) + #Ladder against a building + if scenario1=="ladder": + ladder_length=choice([12,16,..,48]) + #Keep it 60-80 degrees ish + height = choice([int(sin(pi/3)*ladder_length),..,int(sin(80/180*pi)*ladder_length)]) + angle = round(arcsin(height/ladder_length)*180/pi,1) + variables1 = { "height": height, + "ladder": ladder_length, + "angle": angle + } + #Angle of elevation/depression + elif scenario1=="elevation": + scenario=choice(["scenarioA","scenarioB"]) + units=choice(["ft","m"]) + if units=="ft": + height=choice([500,600,..,4000]) + else: + height=choice([100,150,..,1000]) + angle = choice([10..35]) + distance=round(height/sin(angle*pi/180),0) + variables1={ scenario: { + "name": choice(names), + "units": units, + "height": height, + "angle": angle, + "distance": distance, + } + } + #Airplane climbing + elif scenario1=="angleofclimb": + angle = choice([12..20]) + height= choice([5000,6000,..,20000]) + distance=round(height/tan(angle*pi/180),0) + variables1={ "height": height, + "angle": angle, + "distance": distance, + "distance_miles": round(distance/5280,0), + } + elif scenario1=="fire": + angles=sample([40..70],2) + angles.sort() + angle3 = 180-angles[0]-angles[1] + distance=choice([10..40]) + d=round(sin(angles[0]*pi/180)/sin(angle3*pi/180)*distance,1) + + rangers=sample(["Arata", "Botha", "Chang", "Dinh", "Emerson", "Fabian", "Hernandez", "Ishikawa", + "Jones", "Khoury", "Lee", "Martinez", "Naser", "Okpara", "Rodriguez", + "Shalhoub", "Thomas", "Williams", "Zhang"],2) + ranger_answer=rangers[1] + if choice([True,False]): + angles.reverse() + rangers.reverse() + + directions=["left","right"] + shuffle(directions) + + variables1 = { + "park": choice(["Yosemite National Park", "the Sierra National Forest", + "Sequoia National Park", "Kings Canyon National Park", + "the Stanislaus National Forest", "the Tahoe National Forest", + "Pinnacles National Park", "the Inyo National Forest", + "the Sequoia National Forest"]), + "distance": distance, + "angle1": angles[0], + "angle2": angles[1], + "ranger1": rangers[0], + "ranger2": rangers[1], + "direction1": directions[0], + "direction2": directions[1], + "answer": d, + "ranger_answer": ranger_answer, + } + elif scenario1=="scuba": + angles=sample([40..70],2) + #angles.sort() + angle3 = 180-angles[0]-angles[1] + distance=choice([10..40]) + d1=round(sin(angles[1]*pi/180)/sin(angle3*pi/180)*distance,1) + d2=round(sin(angles[0]*pi/180)/sin(angle3*pi/180)*distance,1) + + names=sample([ + "Astera", "Alexi", + "Boudica", "Byron", + "Claudette", "Carlos", + "Devonta", "Deborah", + "Evie", "Envita", + "Federico", "Frankie", + "Greny", "Greta", + "Hani", "Harlin", + "Inigo", "Imogene", + "Jun Young", "Jarvis", + "Khalil", "Kiara", + "Lisandro","Leslie", + "Marcelo", "Melissa", + "Nicolas", "Nicole", + "Pedro", "Pham", + "Raquel", "Rodrigo" ],2) + + variables1 = { + "depth": choice([5..25]), + "animal": choice(["leopard shark", "green moray", "manta ray", "sea turtle"]), + "distance": distance, + "angle1": angles[0], + "angle2": angles[1], + "name1": names[0], + "name2": names[1], + "distance1": d1, + "distance2": d2, + } + + + + + + scenario2=choice(["airport","hiker","boats","ceiling","carpentersquare","bridge"]) + #SAS, Law of cosines + if scenario2=="airport": + plane1,plane2=sample([" Boeing 737", " Boeing 747", " Boeing 767", "n Airbus A320", "n Airbus A330", + " McDonnel Douglas MD11", " Bombardier CRJ200", "n Embraer E170"],2) + d1,d2=sample([10..75],2) + heading1,heading2=sample([10,20,..,350],2) + distance=round(sqrt(d1^2+d2^2-2*d1*d2*cos(abs(heading1-heading2)*pi/180)),1) + variables2={ "plane1": plane1, + "plane2": plane2, + "distance1": d1, + "distance2": d2, + "heading1": heading1, + "heading2": heading2, + "distance3": distance, + "units": choice(["miles","kilometers"]) + } + elif scenario2=="hiker": + d1,d2=sample([2..10],2) + angle=choice([20,25,..,80]+[100,105..,140]) + distance=round(sqrt(d1^2+d2^2-2*d1*d2*cos(pi-angle*pi/180)),1) + variables2={ "distance1": d1, + "distance2": d2, + "angle": angle, + "direction": choice(["left","right"]), + "distance3": distance, + "units": choice(["miles","kilometers"]) + } + ##AAS Law of sines + elif scenario2=="boats": + angle1,angle2=sample([5,10,..,75],2) + d1=choice([10..50]) + d2=round(d1*sin(angle2*pi/180)/sin(angle1*pi/180),1) + d3=round(d1*sin((180-angle1-angle2)*pi/180)/sin(angle1*pi/180),1) + variables2={ "angle1": angle1, + "angle2": angle2, + "distance1": d1, + "distance2": d2, + "distance3": d3, + "specifier": choice(["taller", "newer", "red"]), + "units": choice(["nautical miles", "miles", "kilometers"]) + } + elif scenario2=="ceiling": + angle=choice([85,..,89]+[91..95]) + d=round(choice([2,2.25,..,5]),2) + units=choice(["inches","centimeters"]) + if units=="centimeters": + d=2*d + e=round(d*sin(angle*pi/180)/sin((pi-angle*pi/180)/2),2) + variables2={ "angle": angle, + "distance1": d, + "distance2": e, + "units": units, + } + #SSS + elif scenario2=="carpentersquare": + angle=choice([85,..,89]+[91..95]) + d1,d2=sample([4,4.5,..,20],2) + d3=round(sqrt(d1^2+d2^2-2*d1*d2*cos(angle*pi/180)),1) + angle=round(arccos((d3^2-d1^2-d2^2)/(-2*d1*d2))*180/pi,1) + units=choice(["inches","centimeters"]) + if units=="centimeters": + d1,d2,d3=(2*d1,2*d2,2*d3) + variables2={ "angle": angle, + "distance1": round(d1,1), + "distance2": round(d2,1), + "distance3": d3, + "units": units, + } + elif scenario2=="bridge": + d=sample([50..100],3) + angle_choice = choice(["smallest","largest"]) + if angle_choice=="smallest": + d.sort() + else: + d.sort(reverse=True) + + angle=round(arccos((d[0]^2-d[1]^2-d[2]^2)/(-2*d[1]*d[2]))*180/pi,1) + shuffle(d) + variables2={ + "d1": d[0], + "d2": d[1], + "d3": d[2], + "angle_choice": angle_choice, + "angle": angle, + "units": choice(["feet", "meters"]) + } + + + tasks=[ {scenario1: {**variables1}}, {scenario2: {**variables2}}] + shuffle(tasks) + return { "tasks": tasks } \ No newline at end of file diff --git a/source/precalculus/exercises/outcomes/TE/TE6/template.xml b/source/precalculus/exercises/outcomes/TE/TE6/template.xml new file mode 100644 index 000000000..8e7e69c39 --- /dev/null +++ b/source/precalculus/exercises/outcomes/TE/TE6/template.xml @@ -0,0 +1,148 @@ + + + + + + +

A {{ladder}}\ \text{ft} ladder is leaned against a wall that is + {{height}}\ \text{ft} tall. What angle does the ladder make with the ground?

+
+ +

{{angle}}^\circ

+
+ + + + +

{{name}} is standing on top of a cliff {{height}} {{units}} above a lake. + They see a boat on the lake, and measure an angle of depression from the horizon + to the boat of {{angle}}^\circ. How far away from {{name}} is the boat? +

+
+ +

{{distance}} {{units}}

+
+ + + +

{{name}} sees a person on top of a {{height}} {{units}} tall cliff. + They measure an angle of elevation from the ground to the person of {{angle}}^\circ. + How far away from {{name}} is the other person? +

+
+ +

{{distance}} {{units}}

+
+ + + + +

An airplane takes off from a runway and climbs at angle of {{angle}}^\circ. + How far along the ground does the plane need to travel to reach an altitude of + {{height}}\ \text{ft}? +

+
+ +

{{distance}}\ \text{ft}, or about {{distance_miles}} miles

+
+ + + +

In {{park}}, two fire towers are located {{distance}} miles apart. Ranger {{ranger1}} + is in one tower, and measures that the fire is {{angle1}}^\circ to the {{direction1}} of + the other tower. Ranger {{ranger2}} is in the other tower, and measures that the fire is + {{angle2}}^\circ to the {{direction2}} of the first tower. Which ranger is closer to the + fire, and how far away are they from the fire? +

+
+ +

Ranger {{ranger_answer}} is {{answer}} miles from the fire.

+
+ + + +

{{name1}} and {{name2}} are scuba diving and are {{depth}} meters below the surface of the water, + and are horizontally {{distance}} meters apart. + They spot a {{animal}} swimming below them. The angle of depression from {{name1}} to the {{animal}} is + {{angle1}}^\circ and the angle of depression from {{name2}} to the {{animal}} is {{angle2}}^\circ. + How far is each diver from the {{animal}}? +

+
+ +

{{name1}} is {{distance1}} meters away and {{name2}} is {{distance2}} meters away.

+
+ + + + +

A{{plane1}} is heading directly away from an airport on a heading of {{heading1}}^\circ, + and is {{distance1}} {{units}} away from the airport. + The pilot hears over the radio that there is a{{plane2}} flying at a heading of {{heading2}}^\circ + that is currently {{distance2}} {{units}} from the airport. + How far apart are the two planes? +

+
+ +

{{distance3}} {{units}}

+
+ + + +

In a particular room, the ceiling meets the wall at a {{angle}}^\circangle. A trim carpenter wants + to fit a piece of crown moulding that meets the ceiling and the wall both {{distance1}} {{units}} from the corner. + How wide should this piece of crown moulding be? +

+
+ +

{{distance2}} {{units}}

+
+ + + +

A hiker walks in a straight line for {{distance1}} {{units}}. They turn {{angle}}^\circ + to their {{direction}} and walk another {{distance2}} {{units}}. If they then want to walk + in a straight line back to their starting place, how far must they walk? +

+
+ +

{{distance3}} {{units}}

+
+ + + +

A boat is lost, but sees two lighthouses on the shore. The boat measures an angle of {{angle1}}^\circ + between the two lighthouses, and fortunately establishes radio contact with a person in the {{specifier}} lighthouse. + They report that the lighthouses are {{distance1}} {{units}} apart, and they see an angle of + {{angle2}}^\circ between the boat and the other lighthouse. How far is the boat from each lighthouse? +

+
+ +

{{distance3}} {{units}} from the {{specifier}} lighthouse, and {{distance2}} {{units}} from the other lighthouse.

+
+ + + +

A carpenter is trying to determine if two pieces of wood meet at a right angle, and does not have a square. + One piece of wood is {{distance1}} {{units}} long, and the other is {{distance2}} {{units}} long. + She measures the distance between the other ends of the pieces of wood as {{distance3}} {{units}}. + What angle do the two pieces of wood make with each other? +

+
+ +

{{angle}}^\circ

+
+ + + +

A bridge is supported by triangular braces. If the sides of each brace have lengths + {{d1}} {{units}}, {{d2}} {{units}}, and {{d3}} {{units}}, find the + measure of the {{angle_choice}} angle created by the sides of the brace. +

+
+ +

{{angle}}^\circ

+
+ +
+ +
\ No newline at end of file