# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
157 lines (147 sloc) 7.36 KB
 Triangle types
[ "Equilateral", "Isosceles", "Scalene" ] [ i18n._("Equilateral"), i18n._("Isosceles"), i18n._("Scalene") ] randRange(0, 2) TYPES[TYPE_NUM] DISPLAY_TYPES[TYPE_NUM] function(){ if ( TYPE === "Equilateral" ){ return eqTriangle(); } if ( TYPE === "Isosceles" ){ return isoTriangle(); } if ( TYPE === "Scalene" ){ return scTriangle(); } }()
Is this triangle equilateral, isosceles, and/or scalene?
var tr = new Triangle( [ 0, 0 ], TRIANGLE[ 0 ], 5, {} ); tr.labels = { "angles" : clearArray( tr.niceAngles, [ 0, 1 ] ) }; tr.rotate( randRange( 0, 90 ) ); init({ range: tr.boundingRange( 1 ) }) tr.draw(); tr.drawLabels(); graph.TR = tr;

Select all that apply.

We know two angles of this triangle, so we can find the third by subtracting from 180

180 -TRIANGLE[ 0 ][ 0 ] - TRIANGLE[ 0 ][ 1 ] = TRIANGLE[ 0 ][ 2 ]

graph.TR.labels = { "angles" : clearArray( graph.TR.niceAngles, [2] ) }; graph.TR.drawLabels();

Because all three angles are different, this triangle is scalene.

Two angles are the same, therefore two corresponding sides are as well. Therefore, this triangle is isosceles. Isosceles means a triangle with same (iso) legs (sceles).

All angles equal 60. That means that all the sides are the same and that the triangle is equilateral. (Equilateral means equal(equi) sided(lateral). The triangle is also isosceles because at least two sides are the same length. Isosceles means a triangle with same (iso) legs (sceles).

var tr = new Triangle( [ 0, 0 ], TRIANGLE[ 0 ], 5, {} ); tr.labels = { "sides" : tr.niceSideLengths }; tr.rotate( randRange( 0, 90 ) ); init({ range: tr.boundingRange( 1 ) }) tr.draw(); tr.drawLabels();

Because all three sides are different, this triangle is scalene.

Two sides are the same, therefore, this triangle is isosceles. Isosceles means a triangle with same (iso) legs (sceles).

All sides are the same. That means that all the angles are 60 and that the triangle is equilateral. Equilateral means equal (equi) sided (lateral). The triangle is also isosceles because at least two sides are the same length. Isosceles means a triangle with same (iso) legs (sceles).