Cody

Solution 1973598

Submitted on 13 Oct 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
A = 60; h = 5; y_correct = [0.3752 0.3752 0.6927]; tolerance = 1e-4; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

theta1 = 22.6199 y = 0.3846 0.3846 theta2 = 134.7603 y = 0.3846 0.3846 0.7101

Assertion failed.

2   Fail
A = 12; h = 4; y_correct = [0.7174 0.7174 0.8608]; tolerance = 1e-4; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

theta1 = 53.1301 y = 0.8000 0.8000 theta2 = 73.7398 y = 0.8000 0.8000 0.9600

Assertion failed.

3   Fail
A = 120; h = 8; y_correct = [0.4534 0.4534 0.8001]; tolerance = 1e-4; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

theta1 = 28.0725 y = 0.4706 0.4706 theta2 = 123.8550 y = 0.4706 0.4706 0.8304

Assertion failed.

4   Fail
A = 11; h = 7; y_correct = [0.8281 0.8281 0.3628]; tolerance = 1e-4; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

theta1 = 77.3474 y = 0.9757 0.9757 theta2 = 25.3051 y = 0.9757 0.9757 0.4274

Assertion failed.

5   Fail
A = 10; h = pi; y_correct = [0.6461 0.6461 0.9197]; tolerance = 1e-4; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

theta1 = 44.6240 y = 0.7025 0.7025 theta2 = 90.7520 y = 0.7025 0.7025 0.9999

Assertion failed.

6   Fail
A = 100; h = 90; y_correct = [0.8414 0.8414 0.0208]; tolerance = 1e-4; y = theSineOfAnglesOfATriangle(A,h); assert(abs(y(1)-y_correct(1))<tolerance) assert(abs(y(2)-y_correct(2))<tolerance) assert(abs(y(3)-y_correct(3))<tolerance)

theta1 = 89.2927 y = 0.9999 0.9999 theta2 = 1.4146 y = 0.9999 0.9999 0.0247

Assertion failed.