Project 2: Solving Right Triangles given One Leg and the Hypotenuse

Intro Problem:

Suppose we know:

a) the distance (on the ground) from the base of the wall to the base of the ladder (in feet)

b) the length of the ladder (in feet)


How could we find:

a) The height that the ladder touches the wall (in feet)

b) The angle formed by the ground and the ladder

c) The angle formed by the ladder and the wall


The diagram used below is setup differently, but once you understand how to solve the missing parts of the triangle, come back to this ladder problem.

Project 2: Variables 'a' and 'c' have been initialized.  These values represent a leg and hypotenuse of a right triangle as shown above.  Working methods called sine, cosine, tangentsineInverse, cosineInverse, tangentInverse.

sine(x) returns sine of x

cosine(x) returns cosine of x

tangent(x) returns tangent of x

sineInverse(x) returns sineInverse of x

cosineInverse(x) returns cosineInverse of x

tangentInverse(x) returns tangentInverse of x

Task: Initialize values for 'b', 'angleA', and 'angleB' that represent the appropriate values.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0