Cody

# Problem 43599. Find the sides of an isosceles triangle when given its area and height from its base to apex

Solution 1944413

Submitted on 20 Sep 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 = 12; h = 4; y_correct = [5 5 6]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test1 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

2   Fail
A = 60; h = 5; y_correct = [13 13 24]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test2 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

3   Fail
A = 120; h = 8; y_correct = [17 17 30]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test3 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

4   Fail
A = 50; h = 11; y_correct = [11.9021492607341 11.9021492607341 9.09090909090909]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test4 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

5   Fail
A = 5; h = 3; y_correct = [3.43187671366233 3.43187671366233 10/3]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test5 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

6   Fail
A = 150; h = 10; y_correct = [18.0277563773199 18.0277563773199 30]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint6 (line 4) In solutionTest (line 13)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test6 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

7   Fail
A = 5; h = 0.5; y_correct = [10.0124921972504 10.0124921972504 20]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint7 (line 4) In solutionTest (line 15)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test7 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

8   Fail
A = 42; h = pi; y_correct = [13.7331777948941 13.7331777948941 26.7380304394384]; assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In sidesOfTheTriangle (line 2) In ScoringEngineTestPoint8 (line 4) In solutionTest (line 17)]

Output argument "ans" (and maybe others) not assigned during call to "sidesOfTheTriangle". Error in Test8 (line 4) assert(sum(abs(sidesOfTheTriangle(A,h)-y_correct))<1e-3)