Cody

Solution 2686136

Submitted on 13 Jul 2020 at 6:57 by EmilyR
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   Pass
r=1; y_correct = 0.0858; assert(abs(inscribed_circle_2(r)-y_correct)<0.001)

d1 = 1.4142 d2 = 0.4142 y = 0.0858

2   Pass
r=11; y_correct = 10.3802; assert(abs(inscribed_circle_2(r)-y_correct)<0.001)

d1 = 15.5563 d2 = 4.5563 y = 10.3802

3   Pass
r=45.98; y_correct = 181.3663; assert(abs(inscribed_circle_2(r)-y_correct)<0.001)

d1 = 65.0255 d2 = 19.0455 y = 181.3663

4   Pass
r=0; y_correct = 0; assert(abs(inscribed_circle_2(r)-y_correct)<0.001)

d1 = 0 d2 = 0 y = 0

Suggested Problems

More from this Author148